結果

問題 No.480 合計
ユーザー chamc1984chamc1984
提出日時 2017-12-27 00:45:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 583 bytes
コンパイル時間 4,892 ms
コンパイル使用メモリ 71,204 KB
実行使用メモリ 49,548 KB
最終ジャッジ日時 2023-08-22 22:08:10
合計ジャッジ時間 5,397 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,128 KB
testcase_01 AC 43 ms
49,176 KB
testcase_02 AC 43 ms
47,284 KB
testcase_03 AC 42 ms
49,020 KB
testcase_04 AC 43 ms
49,216 KB
testcase_05 AC 42 ms
49,248 KB
testcase_06 AC 43 ms
49,080 KB
testcase_07 AC 43 ms
49,296 KB
testcase_08 AC 44 ms
49,540 KB
testcase_09 AC 43 ms
49,220 KB
testcase_10 AC 44 ms
49,276 KB
testcase_11 AC 43 ms
49,028 KB
testcase_12 AC 43 ms
49,368 KB
testcase_13 AC 43 ms
49,232 KB
testcase_14 AC 46 ms
49,288 KB
testcase_15 AC 44 ms
49,280 KB
testcase_16 AC 44 ms
49,148 KB
testcase_17 AC 45 ms
49,248 KB
testcase_18 AC 44 ms
49,224 KB
testcase_19 AC 44 ms
49,548 KB
testcase_20 AC 43 ms
49,284 KB
testcase_21 AC 44 ms
49,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class YukiCoder480 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		// Read INPUT
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		try {
			// translate Integer
			int N = Integer.parseInt(br.readLine());
			
			int ans=0;
			// Calculate
			for(int i=1; i<=N; i++) {
				ans+=i;
			}
			
			// output ANSWER
			System.out.println(ans);
			
		} catch(Exception e) {
			System.out.println("error");
		}
		
		return;

	}

}
0