Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
116079 颜学俊逸 12满足条件的四位数 C++ Accepted 1 MS 272 KB 383 2025-04-06 10:15:14

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ /** int n; cin>>n; for (int i = 2;1<n;i++){ if(n % i == 0) { cout<<"No"; return 0; } } cout<<"Yes"; **/ int g,s,b,q,n,w = 0,z; cin>>n; for(int a = 0;a<n;a++){ cin>>z; g = z % 10; s = z / 10 % 10; b = z / 100 %10; q = z / 1000; if(g-q-b-s>0)w++; } cout<<w; return 0; }