Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
116070 晏莞煜 12满足条件的四位数 C++ Accepted 1 MS 272 KB 240 2025-04-06 10:00:28

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,g,s,b,q,w=0,p; cin>>n; for(int a=1;a<=n;a++){ cin>>p; g=p%10; s=p/10%10; b=p/100%10; q=p/1000; if(g>s+b+q){ w++; } } cout<<w; return 0; }