(I7
I120
I150
(dp0
Vremoval.%l
p1
(Vremoval.cpp
p2
S'#include <iostream>\r\nusing namespace std;\r\nint main()\r\n{\r\n    long long tests;\r\n    cin>>tests;\r\n    long long numbers[tests];\r\n    long long counter[tests];\r\n    for(long long h=0; h<tests; h++)\r\n    {\r\n        cin>>numbers[h];\r\n        counter[h]=0;\r\n    }\r\n    long long revenu[tests][1000];\r\n\r\n    for(long long h=0; h<tests; h++)\r\n    {\r\n        for(long long j=0; j<numbers[h]; j++)\r\n        {\r\n            cin>>revenu[h][j];\r\n        }\r\n    }\r\n    long long counter1=0,counter2=0,counter3,counter4,counter5,counter6,counter7,counter8;\r\n    for(long long h=0; h<tests; h++)\r\n    {\r\n        for(long long j=0; j<numbers[h]; j++)\r\n        {\r\n         if(revenu[h][j]%2==0){\r\n            counter1++;\r\n         }else{\r\n         counter2++;\r\n         }\r\n         if(counter2<counter1){\r\n         counter[h]+=counter2;\r\n         }else{\r\n         if(revenu[h][j]%3==0){\r\n            counter3++;\r\n         }else{\r\n         counter4++;\r\n         }\r\n         if(counter3>counter4){\r\n            counter[h]+=counter4;\r\n         }else{\r\n         if(revenu[h][j]%5==0){\r\n            counter5++;\r\n         }else{\r\n         counter6++;\r\n         }\r\n         if(counter5>counter6){\r\n            counter[h]+=counter6;\r\n         }else{\r\n         if(revenu[h][j]%7==0){\r\n            counter7++;\r\n         }else{\r\n         counter8++;\r\n         }\r\n         }\r\n         }\r\n         }\r\n         }\r\n        }\r\n        for(long long j=0;j<tests;j++){\r\n            cout<<counter[j];\r\n        }\r\n    return 0;\r\n}\r\n\r\n'
p3
tp4
stp5
.