結果

問題 No.128 お年玉(1)
ユーザー abcabc
提出日時 2016-11-07 12:53:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 453 bytes
コンパイル時間 2,211 ms
コンパイル使用メモリ 73,780 KB
実行使用メモリ 58,212 KB
最終ジャッジ日時 2024-04-08 18:55:43
合計ジャッジ時間 6,643 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
57,604 KB
testcase_01 AC 142 ms
58,072 KB
testcase_02 AC 139 ms
58,088 KB
testcase_03 AC 140 ms
57,936 KB
testcase_04 AC 141 ms
58,100 KB
testcase_05 AC 141 ms
58,052 KB
testcase_06 AC 144 ms
56,236 KB
testcase_07 AC 144 ms
57,692 KB
testcase_08 AC 139 ms
58,044 KB
testcase_09 AC 140 ms
57,572 KB
testcase_10 AC 144 ms
57,704 KB
testcase_11 AC 140 ms
57,960 KB
testcase_12 AC 147 ms
57,680 KB
testcase_13 AC 141 ms
58,044 KB
testcase_14 AC 142 ms
57,688 KB
testcase_15 AC 144 ms
58,212 KB
testcase_16 AC 141 ms
58,052 KB
testcase_17 AC 151 ms
58,084 KB
testcase_18 AC 140 ms
57,956 KB
testcase_19 AC 148 ms
58,200 KB
testcase_20 AC 143 ms
57,696 KB
testcase_21 AC 140 ms
58,112 KB
testcase_22 AC 141 ms
57,656 KB
testcase_23 AC 142 ms
57,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long budget = sc.nextLong();
        int numChildren = sc.nextInt();

        long numThousandYenBill = budget / 1000;
        long numBillPerChild = numThousandYenBill / numChildren;
        long moneyAmountPerChaild = numBillPerChild * 1000;

        System.out.println(moneyAmountPerChaild);

    }

}
0