Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
354270 | 胡珂 | 【C2-2】编程求1平方+2平方+...+n平方 | C++ | Accepted | 100 | 4 MS | 248 KB | 164 | 2025-10-02 11:28:59 |
#include<iostream> using namespace std; int main(){ int n,sum=0; cin>>n; for(int i=1;i<=n;i++){ sum+=i*i; } cout<<sum; return 0; }