5 条题解
-
2一名蒟蒻 (陈儒乐) LV 9 @ 2022-7-9 10:39:53
/crl(陈儒乐)/
#include<bits/stdc++.h>//网上查到的万能头// using namespace std; int main() { int a,b,c; cin >> a >> b >> c; int f = 1; for(int i = 3; i <= 1e6 ; i++) { if(i%3 == a && i%5 == b && i %7 == c) { f = 0; cout << i << endl; break; } } if(f) cout << "no answer\n"; }
-
12022-10-25 18:57:31@
#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; signed main() { int a, b, c; cin >> a >> b >> c; int num = 3; while(num % 3 != a || num % 5 != b || num % 7 != c) { num++; } cout << num << endl; return 0; }
-
12022-3-8 22:22:01@
#include <stdio.h> int main(void) { int t, r, d, l;
scanf("%d%d%d", &t, &r, &d); for (l = 11; l < 100000000; l++) { if (l % 3 == t && l % 5 == r && l % 7 == d) { printf("%d", l); break; } } if (l + 1 == 100000000) { printf("no answer\n"); } return 0;
}
-
02024-6-13 13:54:44@
include<bits/stdc++.h>//空行 using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; for(int i=3;i<=1e6;i++){ if(i%3a and i%5b and i%7==c){ cout<<i<<endl; return 0; } } cout<<"no answer"; } //dongliyang6666666666666666666skhjkfgjgkjhfgjDV
-
02023-9-8 18:49:19@
#include <iostream> #include <bits/stdc++.h> using namespace std; const int N=32000+10; const int INF=0x3f3f3f3f; int t3,t5,t7; int main() { cin>>t3>>t5>>t7; for(int i=t7;i<=7000;i+=7) { if(i%3==t3 && i%5==t5 && i>=3) { cout<<i; return 0; } } cout<<"no answer"; return 0; }
- 1
信息
- ID
- 910
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 596
- 已通过
- 208
- 上传者