結果
問題 | No.1350 2019-6problem |
ユーザー | ryusuke |
提出日時 | 2022-01-30 16:09:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 318 ms |
コンパイル使用メモリ | 87,052 KB |
実行使用メモリ | 71,688 KB |
最終ジャッジ日時 | 2023-09-02 01:40:43 |
合計ジャッジ時間 | 3,251 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
71,224 KB |
testcase_01 | AC | 69 ms
71,360 KB |
testcase_02 | AC | 71 ms
71,244 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 71 ms
71,280 KB |
testcase_08 | AC | 70 ms
71,356 KB |
testcase_09 | AC | 71 ms
71,408 KB |
testcase_10 | AC | 70 ms
71,508 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
ソースコード
a, b, k = map(int, input().split()) ''' 答えをkとする <=> k以下の自然数でa, bの倍数がk個ある ''' l, r = 0, 10 ** 9 + 1 while r - l > 1: mid = (l + r) // 2 cnt = mid // a + mid // b - mid // (a * b) if cnt >= k: r = mid else: l = mid print(r)