結果

問題 No.480 合計
ユーザー bellbell
提出日時 2021-02-10 22:07:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 72,064 KB
実行使用メモリ 56,516 KB
最終ジャッジ日時 2023-09-22 18:21:15
合計ジャッジ時間 5,995 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,128 KB
testcase_01 AC 119 ms
55,696 KB
testcase_02 AC 119 ms
55,660 KB
testcase_03 AC 120 ms
56,176 KB
testcase_04 AC 119 ms
56,516 KB
testcase_05 AC 122 ms
55,876 KB
testcase_06 AC 122 ms
55,936 KB
testcase_07 AC 117 ms
55,696 KB
testcase_08 AC 120 ms
55,676 KB
testcase_09 AC 119 ms
55,828 KB
testcase_10 AC 120 ms
55,928 KB
testcase_11 AC 123 ms
55,484 KB
testcase_12 AC 121 ms
55,904 KB
testcase_13 AC 120 ms
55,896 KB
testcase_14 AC 120 ms
55,788 KB
testcase_15 AC 120 ms
55,924 KB
testcase_16 AC 120 ms
55,920 KB
testcase_17 AC 120 ms
55,688 KB
testcase_18 AC 120 ms
55,896 KB
testcase_19 AC 120 ms
56,120 KB
testcase_20 AC 119 ms
56,080 KB
testcase_21 AC 120 ms
55,628 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 ans=0;
        for(int i=1; i<=N; i++){
            ans+=i;
        }

        System.out.println(ans);

            sc.close();
    }
}
0