摘要:
注意输出格式 // 1'10" #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "2^" << n << " = " << pow(2,n); return 0; } 阅读全文
posted @ 2024-07-31 20:51
Frodnx
阅读(41)
评论(0)
推荐(0)
摘要:
数组模拟哈希 // 2'00" #include <iostream> using namespace std; int arr[1000]; int main() { string s, d; getline(cin,s); getline(cin,d); for(auto c : d) arr[ 阅读全文
posted @ 2024-07-31 20:47
Frodnx
阅读(16)
评论(0)
推荐(0)
摘要:
水题 // 1'16" #include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(a > b) swap(a, b); if(b > c) swap(b, c); if(a > 阅读全文
posted @ 2024-07-31 18:37
Frodnx
阅读(13)
评论(0)
推荐(0)
摘要:
不开long long见祖宗 // 15'22" #include <iostream> using namespace std; #define int long long class fru { public: int fz; int fm; fru(int x = 0, int y = 1): 阅读全文
posted @ 2024-07-31 18:30
Frodnx
阅读(21)
评论(0)
推荐(0)
摘要:
考察格式 printf("%5d",i); // 5'43" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int sum = 0; int cnt = 1; for(int i = a; 阅读全文
posted @ 2024-07-31 18:08
Frodnx
阅读(30)
评论(0)
推荐(0)
摘要:
注意格式,最后要求不带空格 // 4'18" #include <iostream> using namespace std; int main() { string s; cin >> s; for(int i = 0; i < s.size(); ++ i) { if(s[i] =='-') c 阅读全文
posted @ 2024-07-31 17:54
Frodnx
阅读(18)
评论(0)
推荐(0)
摘要:
暴力即可,考虑从2到sqrt(n)作为连续因子里的最小因子。 // 5'10" #include <iostream> using namespace std; int main() { int n; cin >> n; int res = 1; int num = n; for(int i = 2 阅读全文
posted @ 2024-07-31 17:46
Frodnx
阅读(18)
评论(0)
推荐(0)
摘要:
map存取数据 // 4'57" #include <iostream> #include <map> using namespace std; #define int long long #define x first #define y second signed main() { map<in 阅读全文
posted @ 2024-07-31 14:19
Frodnx
阅读(14)
评论(0)
推荐(0)
摘要:
注意取整 // 1'22" #include <iostream> using namespace std; int main() { double f; cin >> f; cout << "Celsius = " << (int)(5 * (f - 32.0) / 9) << endl; ret 阅读全文
posted @ 2024-07-31 14:18
Frodnx
阅读(11)
评论(0)
推荐(0)
摘要:
数组模拟哈希 // 1'43" #include <iostream> using namespace std; int arr[100]; int main() { string s; cin >> s; for(auto c : s) arr[c - '0'] ++; for(int i = 0 阅读全文
posted @ 2024-07-31 14:14
Frodnx
阅读(10)
评论(0)
推荐(0)
浙公网安备 33010602011771号