結果

問題 No.480 合計
ユーザー NewbiekunNewbiekun
提出日時 2019-02-20 17:04:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 3,000 ms
コンパイル使用メモリ 74,672 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-04-24 16:07:10
合計ジャッジ時間 6,377 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
39,788 KB
testcase_01 AC 115 ms
41,084 KB
testcase_02 AC 112 ms
41,156 KB
testcase_03 AC 110 ms
41,456 KB
testcase_04 AC 111 ms
39,920 KB
testcase_05 AC 103 ms
40,152 KB
testcase_06 AC 108 ms
40,044 KB
testcase_07 AC 111 ms
40,964 KB
testcase_08 AC 111 ms
41,076 KB
testcase_09 AC 106 ms
39,768 KB
testcase_10 AC 113 ms
41,076 KB
testcase_11 AC 111 ms
40,948 KB
testcase_12 AC 115 ms
41,136 KB
testcase_13 AC 95 ms
39,816 KB
testcase_14 AC 104 ms
39,788 KB
testcase_15 AC 116 ms
41,008 KB
testcase_16 AC 113 ms
41,028 KB
testcase_17 AC 116 ms
41,184 KB
testcase_18 AC 100 ms
39,820 KB
testcase_19 AC 110 ms
40,508 KB
testcase_20 AC 105 ms
40,012 KB
testcase_21 AC 111 ms
41,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No480
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

// 1~nまで全て足す。
		int ans = 0;
		for( int i=1; i<=n; i++ ){ ans += i; }

		System.out.println( ans );
	}
}
0