結果

問題 No.176 2種類の切手
ユーザー kou6839kou6839
提出日時 2015-07-02 18:59:34
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 2,400 ms
コンパイル使用メモリ 84,092 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-16 22:14:26
合計ジャッジ時間 7,435 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,348 KB
testcase_01 AC 134 ms
41,444 KB
testcase_02 AC 118 ms
40,448 KB
testcase_03 WA -
testcase_04 AC 134 ms
41,280 KB
testcase_05 AC 134 ms
41,292 KB
testcase_06 AC 133 ms
41,376 KB
testcase_07 AC 134 ms
41,288 KB
testcase_08 AC 133 ms
41,400 KB
testcase_09 AC 131 ms
41,012 KB
testcase_10 AC 132 ms
41,232 KB
testcase_11 AC 131 ms
41,364 KB
testcase_12 AC 132 ms
41,164 KB
testcase_13 WA -
testcase_14 AC 133 ms
41,300 KB
testcase_15 AC 135 ms
41,600 KB
testcase_16 AC 132 ms
41,400 KB
testcase_17 AC 134 ms
41,440 KB
testcase_18 AC 117 ms
40,096 KB
testcase_19 AC 117 ms
40,292 KB
testcase_20 AC 135 ms
41,008 KB
testcase_21 AC 131 ms
41,348 KB
testcase_22 AC 130 ms
41,488 KB
testcase_23 AC 132 ms
41,300 KB
testcase_24 AC 134 ms
41,304 KB
testcase_25 AC 118 ms
40,216 KB
testcase_26 AC 135 ms
40,992 KB
testcase_27 AC 132 ms
41,448 KB
testcase_28 AC 135 ms
41,424 KB
testcase_29 AC 134 ms
41,128 KB
testcase_30 AC 133 ms
41,436 KB
testcase_31 AC 134 ms
41,268 KB
権限があれば一括ダウンロードができます

ソースコード

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+B && i<=A;i++ ) min = Math.min(min, i*B+(T-i*B+A-1)/A*A);
		
		System.out.println(min);
	}

}
0