結果

問題 No.480 合計
ユーザー mkmk
提出日時 2024-03-31 13:15:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 2,825 ms
コンパイル使用メモリ 73,960 KB
実行使用メモリ 57,968 KB
最終ジャッジ日時 2024-03-31 13:15:50
合計ジャッジ時間 6,334 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
57,828 KB
testcase_01 AC 128 ms
57,828 KB
testcase_02 AC 126 ms
57,832 KB
testcase_03 AC 115 ms
56,672 KB
testcase_04 AC 128 ms
56,680 KB
testcase_05 AC 125 ms
57,708 KB
testcase_06 AC 124 ms
57,704 KB
testcase_07 AC 126 ms
56,008 KB
testcase_08 AC 125 ms
57,836 KB
testcase_09 AC 115 ms
56,688 KB
testcase_10 AC 114 ms
56,704 KB
testcase_11 AC 123 ms
57,580 KB
testcase_12 AC 125 ms
57,588 KB
testcase_13 AC 125 ms
57,824 KB
testcase_14 AC 115 ms
56,680 KB
testcase_15 AC 125 ms
57,832 KB
testcase_16 AC 124 ms
57,712 KB
testcase_17 AC 124 ms
57,584 KB
testcase_18 AC 125 ms
57,836 KB
testcase_19 AC 114 ms
56,692 KB
testcase_20 AC 127 ms
57,968 KB
testcase_21 AC 114 ms
56,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.Scanner;

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

	}
}
0