| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159012 | 谭鑫哲 | 满足条件四位数的个数 | C++ | Accepted | 1 MS | 272 KB | 508 | 2026-08-25 09:32:57 |
#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 n,x,q,b,s,g,m=0; cin>>n; while(n>=1){ cin>>x; n--; q=x/1000; b=x/100%10; s=x/10%10; g=x%10; if(g-q-b-s>=1){ m++; } } cout<<m; return 0; }