Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
19682 张志鹏 关灯 C++ Runtime Error 0 0 MS 92 KB 376 2021-05-19 17:58:03

Tests(0/10):


#include<bits/stdc++.h> using namespace std; long long Light[100000001]; 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++; } int main(){ cin>>n; for(long long i=1;i<=n;i++) Check(i); cout<<Answer; return 0; }


Judgement Protocol: