Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113566 | 程诺 | 15加到第几项 | C++ | Accepted | 0 MS | 260 KB | 473 | 2025-03-16 10:02:28 |
#include<bits/stdc++.h> using namespace std; int main(){ /** long long a = 0,n,m,g,s,b,q; cin>>n; for(int i = 1;i <= n ;i++){ cin>>m; g = m % 10; s = m / 10 % 10; b = m %1000 / 100; q = m / 1000; if(g == s + b + q) a+=m; } cout<<a<<endl; long long n,a = 0; cin>>n; for(int i = 1;i <= n;i++){ a+=i*i; } cout<<a<<endl; **/ long long s = 0,n = 0; while(s <= 1000){ n++; s+=n; } cout<<n; return 0; }