結果

問題 No.176 2種類の切手
ユーザー kou6839kou6839
提出日時 2015-07-02 19:01:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 1,000 ms
コード長 435 bytes
コンパイル時間 2,296 ms
コンパイル使用メモリ 75,264 KB
実行使用メモリ 54,228 KB
最終ジャッジ日時 2024-10-08 03:27:30
合計ジャッジ時間 7,506 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
54,096 KB
testcase_01 AC 131 ms
53,788 KB
testcase_02 AC 135 ms
53,972 KB
testcase_03 AC 136 ms
53,956 KB
testcase_04 AC 133 ms
53,968 KB
testcase_05 AC 132 ms
53,744 KB
testcase_06 AC 133 ms
53,872 KB
testcase_07 AC 136 ms
54,036 KB
testcase_08 AC 136 ms
53,888 KB
testcase_09 AC 135 ms
54,100 KB
testcase_10 AC 122 ms
52,776 KB
testcase_11 AC 120 ms
52,968 KB
testcase_12 AC 133 ms
53,932 KB
testcase_13 AC 137 ms
53,936 KB
testcase_14 AC 134 ms
54,024 KB
testcase_15 AC 136 ms
53,800 KB
testcase_16 AC 137 ms
53,892 KB
testcase_17 AC 134 ms
53,976 KB
testcase_18 AC 135 ms
54,076 KB
testcase_19 AC 137 ms
54,160 KB
testcase_20 AC 134 ms
53,960 KB
testcase_21 AC 134 ms
53,864 KB
testcase_22 AC 134 ms
53,912 KB
testcase_23 AC 135 ms
54,036 KB
testcase_24 AC 136 ms
53,828 KB
testcase_25 AC 135 ms
53,620 KB
testcase_26 AC 132 ms
53,840 KB
testcase_27 AC 130 ms
54,228 KB
testcase_28 AC 137 ms
54,024 KB
testcase_29 AC 136 ms
53,884 KB
testcase_30 AC 133 ms
53,832 KB
testcase_31 AC 134 ms
53,956 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);
		long A = sc.nextLong();
		long B = sc.nextLong();
		int T = sc.nextInt();
		long min = 2000000000;
		for(long 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