結果
問題 | No.982 Add |
ユーザー |
![]() |
提出日時 | 2020-03-01 23:01:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 485 ms |
コンパイル使用メモリ | 66,816 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 20:52:58 |
合計ジャッジ時間 | 1,688 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 16 WA * 7 |
ソースコード
#include <vector>#include <iostream>using namespace std;int main() {int A, B;cin >> A >> B;int ans = 0;for (int i = 1; i <= A * B; ++i) {bool ok = false;for (int j = 0; j <= B; ++j) {for (int k = 0; k <= A; ++k) {if (j * A + k * B == i) {ok = true;}}}if (!ok) ++ans;}cout << ans << endl;return 0;}