結果

問題 No.57 ミリオンダイス
ユーザー l1267976l1267976
提出日時 2017-03-15 00:44:19
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 3,069 ms
コンパイル使用メモリ 72,500 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2023-09-12 12:24:22
合計ジャッジ時間 5,555 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,808 KB
testcase_01 AC 121 ms
56,028 KB
testcase_02 AC 120 ms
55,468 KB
testcase_03 AC 119 ms
55,420 KB
testcase_04 AC 122 ms
55,832 KB
testcase_05 AC 119 ms
55,332 KB
testcase_06 AC 120 ms
55,508 KB
testcase_07 AC 119 ms
55,768 KB
testcase_08 AC 120 ms
54,340 KB
testcase_09 AC 120 ms
55,556 KB
testcase_10 AC 119 ms
55,556 KB
testcase_11 AC 120 ms
56,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No57 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        double expect = 0;

        for (int i = 1; i <= 6; i++) {
            expect += ((double) i) / 6;
        }

        expect *= n;

        System.out.println(expect);

        sc.close();
    }

}
0