結果
問題 |
No.176 2種類の切手
|
ユーザー |
![]() |
提出日時 | 2015-04-25 10:48:27 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 877 ms |
コンパイル使用メモリ | 82,200 KB |
実行使用メモリ | 65,220 KB |
最終ジャッジ日時 | 2024-10-08 03:17:40 |
合計ジャッジ時間 | 3,987 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | WA * 1 TLE * 1 -- * 27 |
ソースコード
#!/c/Python34/python # coding: utf-8 def main(): A, B, T = map(int, input().split()) ans = 10**10 i = 0 while A*i <= T and i <= B: dif = T - A*i j = dif//B if dif % B != 0: j += 1 ans = min(ans, A*i+B*j) i += 1 print(ans) if __name__ == '__main__': main()