結果

問題 No.480 合計
ユーザー GrenacheGrenache
提出日時 2017-02-10 22:20:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 5,136 ms
コンパイル使用メモリ 72,808 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-08-21 01:27:28
合計ジャッジ時間 7,348 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,976 KB
testcase_01 AC 126 ms
56,124 KB
testcase_02 AC 126 ms
55,668 KB
testcase_03 AC 126 ms
55,896 KB
testcase_04 AC 126 ms
55,872 KB
testcase_05 AC 126 ms
55,812 KB
testcase_06 AC 125 ms
55,584 KB
testcase_07 AC 126 ms
56,060 KB
testcase_08 AC 126 ms
55,792 KB
testcase_09 AC 125 ms
55,696 KB
testcase_10 AC 126 ms
55,652 KB
testcase_11 AC 126 ms
55,640 KB
testcase_12 AC 126 ms
55,656 KB
testcase_13 AC 125 ms
55,852 KB
testcase_14 AC 125 ms
55,372 KB
testcase_15 AC 126 ms
54,136 KB
testcase_16 AC 125 ms
55,804 KB
testcase_17 AC 126 ms
55,508 KB
testcase_18 AC 125 ms
54,020 KB
testcase_19 AC 125 ms
55,768 KB
testcase_20 AC 126 ms
55,980 KB
testcase_21 AC 126 ms
53,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder480 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		pr.println(n * (n + 1) / 2);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0