| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 19689 | 张志鹏 | 关灯 | C++ | Time Limit Exceeded | 30 | 1000 MS | 548 KB | 409 | 2021-05-19 18:51:45 |
#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; for(long long i=1;i<=n;i++) Check(i); cout<<Answer; return 0; }