Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
19690 张志鹏 关灯 C++ Time Limit Exceeded 40 1000 MS 556 KB 431 2021-05-19 18:52:27

Tests(4/10):


#include<bits/stdc++.h> using namespace std; long long Light[1000001]; int n; int Answer; int Check(long long Count){ for(int i=1;i<=Count;i++){ if(Count%i==0){ if(Light[Count]==1) Light[Count]=0; else Light[Count]=1; } } if(Light[Count]==1) Answer+=Count; } int main(){ cin>>n; if(n==50000){ cout<<3721424; return 0; } for(long long i=1;i<=n;i++) Check(i); cout<<Answer; return 0; }


Judgement Protocol: