結果

問題 No.480 合計
ユーザー syusyu
提出日時 2020-08-25 12:13:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 2,005 ms
コンパイル使用メモリ 76,260 KB
実行使用メモリ 41,548 KB
最終ジャッジ日時 2024-04-24 04:18:21
合計ジャッジ時間 5,237 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
40,084 KB
testcase_01 AC 109 ms
41,156 KB
testcase_02 AC 99 ms
40,460 KB
testcase_03 AC 110 ms
41,548 KB
testcase_04 AC 109 ms
41,168 KB
testcase_05 AC 103 ms
40,368 KB
testcase_06 AC 102 ms
40,312 KB
testcase_07 AC 110 ms
41,324 KB
testcase_08 AC 112 ms
41,492 KB
testcase_09 AC 102 ms
40,340 KB
testcase_10 AC 101 ms
40,076 KB
testcase_11 AC 113 ms
41,172 KB
testcase_12 AC 111 ms
41,464 KB
testcase_13 AC 108 ms
41,464 KB
testcase_14 AC 109 ms
41,352 KB
testcase_15 AC 109 ms
41,096 KB
testcase_16 AC 111 ms
41,080 KB
testcase_17 AC 116 ms
41,356 KB
testcase_18 AC 108 ms
40,944 KB
testcase_19 AC 98 ms
40,060 KB
testcase_20 AC 97 ms
40,076 KB
testcase_21 AC 105 ms
41,024 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 count=0;
        for(int i=1;i<=n;i++){
            count+=i;
        }
        System.out.println(count);

    }
}
0