結果
問題 |
No.176 2種類の切手
|
ユーザー |
![]() |
提出日時 | 2015-07-02 19:01:01 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 433 bytes |
コンパイル時間 | 1,909 ms |
コンパイル使用メモリ | 83,724 KB |
実行使用メモリ | 54,248 KB |
最終ジャッジ日時 | 2024-10-08 03:27:18 |
合計ジャッジ時間 | 6,568 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 4 |
ソースコード
import java.awt.print.Printable; import java.time.Year; import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); int T = sc.nextInt(); long min = 2000000000; for(long i=0;i*B<=T && i<=A;i++ ) min = Math.min(min, i*B+(T-i*B+A-1)/A*A); System.out.println(min); } }