Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
29713 | 惠子铭 | 统计满足条件的4位数 | C++ | Compile Error | 0 MS | 0 KB | 391 | 2023-11-02 18:37:54 |
#include <iostream> using namespace std; int shuzi(int m){ int g,s,b,q; q=m/1000; b=(m-1000*q)/100; s=(m-1000*q-100*b)/10; g=m-1000*q-100*b-10*s; if(g-q-b-s>0){ return 1; }else{ return 0; } } int main() { int a; cin>>a; int manzu=0; for(int i=0;i<a;i++){ int b; cin >>b; manzu=manzu+shuzi(b); } cout<<manzu; return 1; }