2019-12-24から1日間の記事一覧
問題:A - White Cells #include <algorithm> #include <iostream> using namespace std; int main(void) { int h, w, selh, selw; cin.tie(0); ios::sync_with_stdio(false); cin >> h >> w; cin >> selh >> selw; cout << (h - selh) * (w - selw) << "\n"; return 0; }</iostream></algorithm>
問題:B - K-th Common Divisor #include <algorithm> #include <iostream> using namespace std; int main(void) { int a, b, k, cnt = 0, ans = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> k; for (int i = min(a, b); i >= 1; --i) { if (a % i == 0 && b </iostream></algorithm>…