| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151029 | 赖泓宇 | 满足Sn>k的最小n | C++ | Compile Error | 0 MS | 0 KB | 516 | 2026-04-03 18:38:50 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int g,s,b,q,s=0,n,i,t; cin>>n; for(i=1;i<=n;i++){ cin>>t; g=t%10; s=(t/10)%10; b=(t/100)%10; q=(t/1000)%10; if(g>s+b+q){ s++; } } cout<<s<<endl; }
Main.cc: In function 'int main()':
Main.cc:9:16: error: redeclaration of 'int s'
int g,s,b,q,s=0,n,i,t;
^
Main.cc:9:10: note: 'int s' previously declared here
int g,s,b,q,s=0,n,i,t;
^