9 条题解
-
1余子萱mary (yuzixuan1) LV 8 @ 2023-8-6 15:59:42
#include <iostream> using namespace std; int n,j,g,s,b,q,m; int main() { cin>>n; for(int i=0;i<=n;++i) { cin>>j; g=j%10; s=j/10%10; b=j/100%10; q=j/1000; if(g-q-b-s>0) { m+=1; } } cout<<m; return 0; }
-
12023-4-9 19:32:49@
#include <iostream> using namespace std; int main() { int a,j,sum=0; cin>>a; for(int i=1;i<=a;i++) { cin>>j; int g=j%10; int s=j/10%10; int b=j/100%10; int q=j/1000; if(g-q-s-b>0) { sum++; } } cout<<sum; }
-
12022-10-25 13:03:56@
#include <iostream> #include <stack> #include <cmath> #include <vector> #include <string.h> #include <queue> #include <stdio.h> #include <iomanip> #include <cstdio> #include <algorithm> #define int long long using namespace std; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int jian(int x) { int ge = x % 10; int shi = x % 100 / 10; int bai = x % 1000 / 100; int qian = x / 1000; if(ge - shi - bai - qian > 0) { return 0; } return -1; } signed main() { int n; cin >> n; int cnt = 0; for(int i = 1; i <= n; i++) { int a = 0; cin >> a; if(jian(a) == 0) { cnt++; } } printf("%lld\n", cnt); return 0; }
-
02024-6-12 20:37:18@
col1 col2 col3 #include using namespace std; int main() { int k,j,sum=0; cin>>k; for(int i=1;i<=k;i++) { cin>>j; int a=j%10; int b=j/10%10; int c=j/100%10; int d=j/1000; if(a-d-b-c>0) { sum++; } cout/少了两个小于号/sum; } //dongliyang6666666666666666666skhjkfgjgkjhfgjDV //没有工具包 -
02023-3-5 20:08:47@
#include <iostream> using namespace std; int main() { int n, num, x=0, ge, shi, bai, qian; cin >> n; for (int i=0; i<n; i++){ cin >> num; qian = num/1000; bai = num/100%10; shi = num/10%10; ge = num%10; if ((ge-qian-bai-shi)>0) x++; } cout << x << endl; return 0; }
-
02022-1-8 15:08:44@
#include <iostream> using namespace std; int main() { int n, num, x=0, ge, shi, bai, qian; cin >> n; for (int i=0; i<n; i++){ cin >> num; qian = num/1000; bai = num/100%10; shi = num/10%10; ge = num%10; if ((ge-qian-bai-shi)>0) x++; } cout << x << endl; return 0; }
-
-12023-3-13 17:33:03@
#include <iostream> using namespace std; int main() { int n, num, x=0, ge, shi, bai, qian; cin >> n; for (int i=0; i<n; i++){ cin >> num; qian = num/1000; bai = num/100%10; shi = num/10%10; ge = num%10; if ((ge-qian-bai-shi)>0) x++; } cout << x << endl; return 0; }
-
-12022-1-9 21:24:49@
#include<iostream> #include<iomanip> #include<math.h> using namespace std; int main() { int n; cin >> n; int a; int g,s,b,q; int c=0; for(int i=0;i<n;i++) { cin>>a; g=a%10; s=a/10%10; b=a/100%10; q=a/1000; if((g-s-b-q)>0) { c++; } }cout<<c; }
-
-22022-6-17 17:26:43@
#include<iostream> #include<iomanip> #include<cstring> #include<string> #include<sstream> #include<cstdio> #include<cmath> #include<cstdlib> #include<queue> #include<vector> #include<algorithm> #include<stack> #include<fstream> #include<cstdlib> #include<ctime> #include<bits/stdc++.h> #define ll long long const int N=1e5+10; const int INF=0x3f3f3f3f; using namespace std; int main(){ int n,sum=0,g,s,b,q,c; cin>>n; for(int i=0;i<n;i++){ cin>>c; g=c%10; s=c/10%10; b=c/100%10; q=c/1000; if((g-q-b-s)>0){ sum++; } }cout<<sum; return 0; }
- 1
信息
- ID
- 951
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 3
- 标签
- 递交数
- 722
- 已通过
- 365
- 上传者