結果

問題 No.480 合計
ユーザー 🐧しゅんチャマ🌸🐧しゅんチャマ🌸
提出日時 2023-09-06 22:34:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 1,787 ms
コンパイル使用メモリ 71,652 KB
実行使用メモリ 56,296 KB
最終ジャッジ日時 2023-09-06 22:34:41
合計ジャッジ時間 5,315 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,788 KB
testcase_01 AC 114 ms
55,932 KB
testcase_02 AC 115 ms
55,684 KB
testcase_03 AC 111 ms
55,648 KB
testcase_04 AC 113 ms
55,892 KB
testcase_05 AC 110 ms
55,684 KB
testcase_06 AC 110 ms
55,584 KB
testcase_07 AC 116 ms
55,636 KB
testcase_08 AC 126 ms
56,084 KB
testcase_09 AC 111 ms
56,296 KB
testcase_10 AC 112 ms
55,936 KB
testcase_11 AC 113 ms
54,144 KB
testcase_12 AC 110 ms
55,720 KB
testcase_13 AC 112 ms
56,120 KB
testcase_14 AC 113 ms
55,952 KB
testcase_15 AC 114 ms
55,652 KB
testcase_16 AC 114 ms
55,684 KB
testcase_17 AC 124 ms
53,996 KB
testcase_18 AC 112 ms
56,124 KB
testcase_19 AC 111 ms
55,980 KB
testcase_20 AC 116 ms
56,168 KB
testcase_21 AC 112 ms
55,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int sum=0;
        for(int i=1;i<=N;i++){
            sum+=i;
        }
        System.out.println(sum);
    }
}
0