#include <iostream> using namespace std; int tj(int m){ int a=m%10; int b=m%100/10; int c=m%1000/100; int d=m/1000; if(a-b-c-d>0){ return 1; }else{ return 0; } } int main(int argc, char** argv) { int n; cin>>n; int x; for(int i=0;i<n;i++){ int b; cin>>b; x=x+tj(b); } cout<<x; return 0; }
标签:m%,满足条件,return,10,int,tj,位数,100,统计 From: https://www.cnblogs.com/fushuxuan/p/17083768.html