結果

問題 No.480 合計
ユーザー KatoooooKatooooo
提出日時 2017-02-11 11:27:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 3,194 ms
コンパイル使用メモリ 71,928 KB
実行使用メモリ 56,192 KB
最終ジャッジ日時 2023-08-21 02:39:03
合計ジャッジ時間 7,070 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,916 KB
testcase_01 AC 124 ms
55,840 KB
testcase_02 AC 125 ms
56,040 KB
testcase_03 AC 126 ms
56,192 KB
testcase_04 AC 127 ms
56,036 KB
testcase_05 AC 124 ms
55,800 KB
testcase_06 AC 125 ms
55,960 KB
testcase_07 AC 125 ms
55,732 KB
testcase_08 AC 125 ms
55,736 KB
testcase_09 AC 126 ms
55,660 KB
testcase_10 AC 124 ms
56,148 KB
testcase_11 AC 126 ms
55,728 KB
testcase_12 AC 128 ms
55,792 KB
testcase_13 AC 126 ms
55,860 KB
testcase_14 AC 125 ms
55,940 KB
testcase_15 AC 124 ms
56,156 KB
testcase_16 AC 127 ms
56,136 KB
testcase_17 AC 127 ms
55,528 KB
testcase_18 AC 127 ms
55,628 KB
testcase_19 AC 124 ms
53,452 KB
testcase_20 AC 125 ms
56,016 KB
testcase_21 AC 124 ms
56,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class sum{

  public static void main(String[] args){

    Scanner input=new Scanner(System.in);
    int N = input.nextInt();

    int sum = 0;
    for(int i = 1; i<=N; i++){
      sum = sum+i;
    }

    System.out.println(sum);

  }

}
0