結果

問題 No.480 合計
ユーザー shinshin
提出日時 2022-05-12 15:11:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 3,149 ms
コンパイル使用メモリ 72,036 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-09-27 14:40:32
合計ジャッジ時間 7,156 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
55,812 KB
testcase_01 AC 105 ms
55,844 KB
testcase_02 AC 120 ms
56,356 KB
testcase_03 AC 113 ms
56,128 KB
testcase_04 AC 103 ms
55,528 KB
testcase_05 AC 102 ms
56,052 KB
testcase_06 AC 105 ms
55,444 KB
testcase_07 AC 107 ms
56,104 KB
testcase_08 AC 103 ms
56,208 KB
testcase_09 AC 106 ms
55,848 KB
testcase_10 AC 105 ms
55,904 KB
testcase_11 AC 102 ms
55,744 KB
testcase_12 AC 101 ms
55,628 KB
testcase_13 AC 104 ms
55,672 KB
testcase_14 AC 104 ms
56,036 KB
testcase_15 AC 103 ms
55,852 KB
testcase_16 AC 101 ms
55,824 KB
testcase_17 AC 107 ms
55,968 KB
testcase_18 AC 105 ms
55,812 KB
testcase_19 AC 103 ms
55,920 KB
testcase_20 AC 100 ms
55,948 KB
testcase_21 AC 104 ms
56,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No480 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String N = s.nextLine();
		s.close();
		
		int i = 1,count=0;
		for(i = 1;i <= Integer.parseInt(N);i++){
			count += i;
		}
		
		System.out.println(count);

	}

}
0