よじろめ覚書

私の理解度重視のソースコードです。

2019-11-11から1日間の記事一覧

ABC098A - Add Sub Mul

ABC

問題:A - Add Sub Mul #include <algorithm> #include <iostream> using namespace std; int main(void){ int a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b; cout << max(a + b, max(a - b, a * b)) << "\n"; return 0; }</iostream></algorithm>

ABC097B - Exponential

ABC

問題:B - Exponential #include <algorithm> #include <cmath> #include <iostream> using namespace std; int main(void){ int x, ans = 1; cin.tie(0); ios::sync_with_stdio(false); cin >> x; for (int b = 2; b <= x; ++b) { for (int p = 2; (int)pow((double)b, (double)p) <= x;</iostream></cmath></algorithm>…