結果

問題 No.480 合計
ユーザー yu_017yu_017
提出日時 2019-01-13 18:18:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 4,824 ms
コンパイル使用メモリ 73,056 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-08-26 21:48:06
合計ジャッジ時間 6,232 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,840 KB
testcase_01 AC 112 ms
55,524 KB
testcase_02 AC 107 ms
56,188 KB
testcase_03 AC 108 ms
56,024 KB
testcase_04 AC 104 ms
55,804 KB
testcase_05 AC 106 ms
55,720 KB
testcase_06 AC 105 ms
56,168 KB
testcase_07 AC 110 ms
56,116 KB
testcase_08 AC 110 ms
55,708 KB
testcase_09 AC 112 ms
55,952 KB
testcase_10 AC 109 ms
55,908 KB
testcase_11 AC 107 ms
55,836 KB
testcase_12 AC 108 ms
55,960 KB
testcase_13 AC 112 ms
55,876 KB
testcase_14 AC 113 ms
55,904 KB
testcase_15 AC 115 ms
55,808 KB
testcase_16 AC 112 ms
56,224 KB
testcase_17 AC 112 ms
55,992 KB
testcase_18 AC 109 ms
55,840 KB
testcase_19 AC 109 ms
55,772 KB
testcase_20 AC 113 ms
55,788 KB
testcase_21 AC 117 ms
55,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A000480 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int in = sc.nextInt();
		sc.close();
		for(int i=1,r=0;i<=in;i++) {
			r += i;
			if(i==in)System.out.println(r);
		}
	}

}
0