結果

問題 No.604 誕生日のお小遣い
ユーザー YamaKasaYamaKasa
提出日時 2018-09-26 16:08:48
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 2,676 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 41,508 KB
最終ジャッジ日時 2024-04-19 07:46:06
合計ジャッジ時間 6,350 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 108 ms
41,080 KB
testcase_02 AC 95 ms
40,124 KB
testcase_03 AC 118 ms
41,100 KB
testcase_04 AC 116 ms
40,712 KB
testcase_05 AC 112 ms
40,840 KB
testcase_06 AC 111 ms
40,928 KB
testcase_07 AC 126 ms
41,424 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 118 ms
40,440 KB
testcase_11 AC 113 ms
40,992 KB
testcase_12 AC 106 ms
41,244 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 99 ms
39,516 KB
testcase_16 WA -
testcase_17 AC 110 ms
41,300 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long A = scan.nextLong();
		long B = scan.nextLong();
		long C = scan.nextLong();
		scan.close();
		long t = C / (A + B - 1);
		long ans = t * A + C - t * (A + B - 1);
		System.out.println(ans);
	}
}
0