摘要:
不会写可以switch把所有情况全写出来,总共只有六种不多 // 4'05" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if(b == 1 || b == 0 && a == 2) c 阅读全文
posted @ 2024-08-24 01:47
Frodnx
阅读(155)
评论(0)
推荐(0)
摘要:
// 1'02" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << b - a; return 0; } 阅读全文
posted @ 2024-08-24 01:41
Frodnx
阅读(29)
评论(0)
推荐(0)
摘要:
print("Problem? The Solution: Programming.") 阅读全文
posted @ 2024-08-24 01:39
Frodnx
阅读(32)
评论(0)
推荐(0)
摘要:
ez // 5'46" #include <bits/stdc++.h> using namespace std; bool func(int a, int b) { int sum = 0; while(a) { sum += a % 10; a /= 10; } return b % sum; 阅读全文
posted @ 2024-08-24 01:37
Frodnx
阅读(33)
评论(0)
推荐(0)
摘要:
想得太复杂,这道题不会卡你人数为0时候的情况,不要忘记题目的条件:不允许单人住一间寝室 // 32'41" #include <bits/stdc++.h> using namespace std; map<int,bool> div(int x) { map<int,bool> hash; if( 阅读全文
posted @ 2024-08-24 01:29
Frodnx
阅读(57)
评论(0)
推荐(0)
浙公网安备 33010602011771号