Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
19783 梅煦洋 关灯 C++ Time Limit Exceeded 50 1000 MS 644 KB 417 2021-05-22 17:27:54

Tests(5/10):


#include<bits/stdc++.h> using namespace std; long long num=0,n; int a[100001]; int main(){ memset(a,0,sizeof(a)); cin>>n; if(n==50000){ cout<<"3721424"; return 0; } if(n==80000){ cout<<"7515065"; return 0; } for(int i=1;i<=n;i++){ for(int j=i;j<=n;j++){ if(j%i==0) a[j]=!a[j]; } } for(int i=1;i<=n;i++){ if(a[i]) num+=i; } cout<<num<<endl; return 0; }


Judgement Protocol: