Albedo is a master alchemist. In one operation, he can generate a sequence. Please help Albedo find the minimum number of operations to generate exact
Albedo needs some pieces of 7 7 colors to paint PaiMonaLisa! Colors are numbered from 0 to 6 6. For color i i, he needs exact a_i a i pieces. Albedo is a master alchemist. In one operation, he can generate a sequence s s of any length k k. For the sequence s_0,s_1,dots,s_{k-1} s ,s 1 ,…,s k−1 , s_i=i%7 s i =i%7 hold for iin [0,k-1] i∈[0,k−1]. The i i-th element indicates a piece of color s_i s i . Please help Albedo find the minimum number of operations to generate exact a_i a i pieces for all 7 7 colors.