結果

問題 No.176 2種類の切手
ユーザー kou6839
提出日時 2015-07-02 18:57:41
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 2,178 ms
コンパイル使用メモリ 84,108 KB
実行使用メモリ 54,224 KB
最終ジャッジ日時 2024-10-08 03:26:42
合計ジャッジ時間 7,665 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int T = sc.nextInt();
		int min = 2000000000;
		for(int 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);
	}

}
0