提交时间:2024-11-08 15:57:23
运行 ID: 55837
#include<iostream> using namespace std; int main(){ int n; cin >> n; int a[n]; for(int i=0;i<n;i++){ cin >> a[i]; } int ge=0,shi=0,bai=0,qian=0; int sum=0; for(int i=0;i<n;i++){ ge=a[i]%10; shi=(a[i]%100-ge)/10; bai=(a[i]%1000-shi*10-ge)/100; qian=(a[i]%10000-bai*100-shi*10-ge)/1000; if(ge-shi-bai-qian > 0){ sum+=1; } } cout << sum; return 0; }