結果
問題 |
No.604 誕生日のお小遣い
|
ユーザー |
![]() |
提出日時 | 2020-01-29 22:41:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-21 19:31:41 |
合計ジャッジ時間 | 1,590 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B,C = map(int,read().split()) def f(x): n = x // A return (x-n) + B * n left = 0 # C 未満 right = C # C以上 while left + 1 < right: x = (left + right) // 2 if f(x) < C: left = x else: right = x answer = right print(answer)