結果

問題 No.604 誕生日のお小遣い
ユーザー ryosuke0825ryosuke0825
提出日時 2018-09-18 22:45:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 2,162 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 56,604 KB
最終ジャッジ日時 2023-09-25 09:57:24
合計ジャッジ時間 6,907 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 117 ms
55,512 KB
testcase_02 AC 119 ms
55,988 KB
testcase_03 AC 117 ms
55,684 KB
testcase_04 AC 119 ms
56,172 KB
testcase_05 AC 118 ms
55,712 KB
testcase_06 AC 118 ms
56,016 KB
testcase_07 AC 118 ms
55,856 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 118 ms
56,016 KB
testcase_11 AC 119 ms
55,648 KB
testcase_12 AC 117 ms
56,004 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 120 ms
55,416 KB
testcase_16 WA -
testcase_17 AC 118 ms
55,816 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 sc = new Scanner(System.in);
		String nx = sc.nextLine();
		String[] nxArr = nx.split(" ");
		long a = Long.parseLong(nxArr[0]);
		long b = Long.parseLong(nxArr[1]);
		long c = Long.parseLong(nxArr[2]);
		sc.close();

		long t =b+(a-1);
		System.out.println(c/t*a+(c-c/t*t));

	}

}
0