結果

問題 No.1033 乱数サイ
ユーザー tentententen
提出日時 2020-11-09 20:28:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 1,929 ms
コンパイル使用メモリ 71,784 KB
実行使用メモリ 56,576 KB
最終ジャッジ日時 2023-09-29 22:15:02
合計ジャッジ時間 5,250 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,656 KB
testcase_01 AC 121 ms
55,680 KB
testcase_02 AC 122 ms
56,056 KB
testcase_03 AC 122 ms
55,968 KB
testcase_04 AC 122 ms
56,236 KB
testcase_05 AC 123 ms
56,260 KB
testcase_06 AC 121 ms
56,576 KB
testcase_07 AC 120 ms
55,752 KB
testcase_08 AC 120 ms
53,660 KB
testcase_09 AC 122 ms
55,868 KB
testcase_10 AC 121 ms
55,896 KB
testcase_11 AC 123 ms
55,880 KB
testcase_12 AC 122 ms
55,792 KB
testcase_13 AC 125 ms
55,896 KB
testcase_14 AC 123 ms
56,004 KB
testcase_15 AC 121 ms
55,564 KB
testcase_16 AC 122 ms
55,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        System.out.println((double)n * (n + 1) / 2 / (n + 1));
    }
}
0