結果

問題 No.176 2種類の切手
ユーザー kou6839kou6839
提出日時 2015-07-02 19:01:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 435 bytes
コンパイル時間 2,123 ms
コンパイル使用メモリ 75,296 KB
実行使用メモリ 41,712 KB
最終ジャッジ日時 2024-04-16 22:14:43
合計ジャッジ時間 7,416 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,236 KB
testcase_01 AC 119 ms
40,292 KB
testcase_02 AC 135 ms
41,332 KB
testcase_03 AC 132 ms
41,248 KB
testcase_04 AC 132 ms
41,352 KB
testcase_05 AC 133 ms
41,260 KB
testcase_06 AC 133 ms
41,180 KB
testcase_07 AC 120 ms
40,220 KB
testcase_08 AC 133 ms
41,492 KB
testcase_09 AC 135 ms
41,572 KB
testcase_10 AC 132 ms
41,504 KB
testcase_11 AC 133 ms
41,524 KB
testcase_12 AC 135 ms
41,620 KB
testcase_13 AC 132 ms
41,420 KB
testcase_14 AC 130 ms
41,136 KB
testcase_15 AC 130 ms
41,264 KB
testcase_16 AC 120 ms
40,400 KB
testcase_17 AC 133 ms
41,340 KB
testcase_18 AC 120 ms
40,384 KB
testcase_19 AC 135 ms
41,364 KB
testcase_20 AC 133 ms
41,052 KB
testcase_21 AC 133 ms
41,224 KB
testcase_22 AC 134 ms
41,464 KB
testcase_23 AC 138 ms
41,268 KB
testcase_24 AC 133 ms
41,712 KB
testcase_25 AC 119 ms
40,488 KB
testcase_26 AC 133 ms
41,212 KB
testcase_27 AC 132 ms
41,340 KB
testcase_28 AC 132 ms
41,504 KB
testcase_29 AC 134 ms
41,180 KB
testcase_30 AC 134 ms
41,516 KB
testcase_31 AC 135 ms
41,056 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