結果

問題 No.480 合計
ユーザー ikawaiikawai
提出日時 2023-09-01 12:06:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 1,930 ms
コンパイル使用メモリ 70,592 KB
実行使用メモリ 56,148 KB
最終ジャッジ日時 2023-09-01 12:06:13
合計ジャッジ時間 6,050 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
56,132 KB
testcase_01 AC 114 ms
55,468 KB
testcase_02 AC 115 ms
55,664 KB
testcase_03 AC 113 ms
55,908 KB
testcase_04 AC 115 ms
55,752 KB
testcase_05 AC 114 ms
55,912 KB
testcase_06 AC 115 ms
55,684 KB
testcase_07 AC 136 ms
55,956 KB
testcase_08 AC 116 ms
55,920 KB
testcase_09 AC 117 ms
55,780 KB
testcase_10 AC 114 ms
55,816 KB
testcase_11 AC 117 ms
55,792 KB
testcase_12 AC 113 ms
56,076 KB
testcase_13 AC 113 ms
54,268 KB
testcase_14 AC 113 ms
56,148 KB
testcase_15 AC 115 ms
56,140 KB
testcase_16 AC 129 ms
55,632 KB
testcase_17 AC 114 ms
55,716 KB
testcase_18 AC 116 ms
55,476 KB
testcase_19 AC 111 ms
55,824 KB
testcase_20 AC 115 ms
55,704 KB
testcase_21 AC 111 ms
56,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Wandbox
{
    public static void main(String[] args)
    {
    	Scanner sc = new Scanner(System.in);
    	int num = sc.nextInt();
    	int ans = 0;
    	for (int i = 1; i <= num; i++) {
    		ans += i;
    	} 
        System.out.println(ans);
    }
}
0