結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
e-mon
|
| 提出日時 | 2015-04-02 23:46:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 332 bytes |
| コンパイル時間 | 471 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 66,492 KB |
| 最終ジャッジ日時 | 2024-10-08 01:38:22 |
| 合計ジャッジ時間 | 4,270 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 12 TLE * 1 -- * 9 |
ソースコード
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
A,B,T = map(int,input().split())
A,B = max(A,B),min(A,B)
total = 0
for i in range(math.ceil(T/A))[::-1]:
if T - total == 0:
break
if T-total > T-(i*A+B*math.ceil((T-i*A)/B)) >= 0:
total = i*A+B*math.ceil((T-i*A)/B)
print(total if total > 0 else B)
e-mon