結果

問題 No.480 合計
ユーザー ダンネックダンネック
提出日時 2020-05-18 16:55:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 3,247 ms
コンパイル使用メモリ 75,168 KB
実行使用メモリ 54,424 KB
最終ジャッジ日時 2024-04-09 21:30:16
合計ジャッジ時間 5,908 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
54,212 KB
testcase_01 AC 95 ms
52,652 KB
testcase_02 AC 108 ms
54,016 KB
testcase_03 AC 115 ms
54,304 KB
testcase_04 AC 114 ms
53,948 KB
testcase_05 AC 115 ms
54,184 KB
testcase_06 AC 109 ms
52,884 KB
testcase_07 AC 114 ms
54,136 KB
testcase_08 AC 104 ms
52,800 KB
testcase_09 AC 109 ms
54,208 KB
testcase_10 AC 108 ms
53,996 KB
testcase_11 AC 110 ms
53,040 KB
testcase_12 AC 105 ms
53,980 KB
testcase_13 AC 106 ms
53,932 KB
testcase_14 AC 111 ms
54,012 KB
testcase_15 AC 107 ms
54,024 KB
testcase_16 AC 110 ms
53,880 KB
testcase_17 AC 98 ms
52,716 KB
testcase_18 AC 107 ms
54,424 KB
testcase_19 AC 109 ms
54,160 KB
testcase_20 AC 107 ms
53,996 KB
testcase_21 AC 110 ms
53,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class calcu{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int sum = 0;
        int i;
        int n = stdIn.nextInt();
        for(i = 1; i <= n; i++){
            sum += i;
        }
        System.out.println(sum);
        stdIn.close();
    }
}
0