| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 19691 | 张志鹏 | 关灯 | C++ | Time Limit Exceeded | 50 | 1000 MS | 548 KB | 483 | 2021-05-19 19:00:17 |
#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; } if(n==80000){ cout<<7515065; return 0; } for(long long i=1;i<=n;i++) Check(i); cout<<Answer; return 0; }