結果

問題 No.480 合計
ユーザー cande398cande398
提出日時 2017-10-08 00:18:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 1,991 ms
コンパイル使用メモリ 70,704 KB
実行使用メモリ 56,540 KB
最終ジャッジ日時 2023-08-21 02:03:01
合計ジャッジ時間 5,728 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,572 KB
testcase_01 AC 126 ms
56,540 KB
testcase_02 AC 122 ms
55,772 KB
testcase_03 AC 121 ms
56,056 KB
testcase_04 AC 121 ms
55,792 KB
testcase_05 AC 121 ms
55,660 KB
testcase_06 AC 123 ms
55,788 KB
testcase_07 AC 121 ms
55,880 KB
testcase_08 AC 121 ms
55,688 KB
testcase_09 AC 121 ms
55,828 KB
testcase_10 AC 122 ms
56,032 KB
testcase_11 AC 123 ms
55,956 KB
testcase_12 AC 125 ms
56,000 KB
testcase_13 AC 122 ms
55,984 KB
testcase_14 AC 121 ms
55,348 KB
testcase_15 AC 124 ms
55,972 KB
testcase_16 AC 122 ms
56,004 KB
testcase_17 AC 124 ms
55,624 KB
testcase_18 AC 122 ms
56,320 KB
testcase_19 AC 123 ms
55,980 KB
testcase_20 AC 125 ms
55,628 KB
testcase_21 AC 123 ms
55,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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