Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
20002 | 桑迪 | 关灯 | C++ | Runtime Error | 0 | 0 MS | 244 KB | 249 | 2021-05-27 21:33:37 |
#include<iostream> using namespace std; int main() { freopen("x14_7.in","r",stdin); freopen("x14_7.out","w",stdout); int i,n; long long ans=0;//没用long long 30分 cin>>n; for(i=1;i*i<=n;i++) ans+=i*i; cout<<ans; return 0; }