結果

問題 No.480 合計
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 17:42:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 2,059 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2023-10-11 12:20:19
合計ジャッジ時間 6,152 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,992 KB
testcase_01 AC 126 ms
56,048 KB
testcase_02 AC 124 ms
55,504 KB
testcase_03 AC 126 ms
55,988 KB
testcase_04 AC 124 ms
55,936 KB
testcase_05 AC 124 ms
55,808 KB
testcase_06 AC 124 ms
55,456 KB
testcase_07 AC 127 ms
55,992 KB
testcase_08 AC 126 ms
55,724 KB
testcase_09 AC 126 ms
56,024 KB
testcase_10 AC 126 ms
55,600 KB
testcase_11 AC 125 ms
55,788 KB
testcase_12 AC 124 ms
55,816 KB
testcase_13 AC 124 ms
55,588 KB
testcase_14 AC 125 ms
55,568 KB
testcase_15 AC 125 ms
55,996 KB
testcase_16 AC 123 ms
55,916 KB
testcase_17 AC 123 ms
55,556 KB
testcase_18 AC 123 ms
53,740 KB
testcase_19 AC 127 ms
56,016 KB
testcase_20 AC 125 ms
55,860 KB
testcase_21 AC 123 ms
55,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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