113352024-08-18 20:42:54matekimado11Farmula 1cpp17Accepted 100/10016ms680 KiB
#include<iostream>
using namespace std;
int main()
{
    int t;
    cin>>t;
    for(int i=0;i<t;i++)
    {
        int n,p=0,mp=0;
        cin>>n;
        int k[20]={25,18,15,12,10,8,6,4,2,1,0,0,0,0,0,0,0,0,0,0};
        for(int j=0;j<n;j++)
        {
            int a;
            cin>>a;
            p+=k[a-1];
            mp+=18;
            if(a!=1)mp+=7;
        }
        if(p>=mp){cout<<"Champion";}
        else{cout<<"Practice harder";}
        cout<<endl;
    }
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted2ms356 KiB
subtask220/20
2Accepted6ms356 KiB
3Accepted6ms356 KiB
subtask320/20
4Accepted14ms680 KiB
5Accepted14ms488 KiB
6Accepted14ms472 KiB
7Accepted9ms504 KiB
subtask460/60
8Accepted14ms524 KiB
9Accepted16ms484 KiB
10Accepted14ms504 KiB
11Accepted10ms356 KiB