結果

問題 No.480 合計
ユーザー goma
提出日時 2017-09-10 01:01:59
言語 Java
(openjdk 23)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 2,080 ms
コンパイル使用メモリ 74,156 KB
実行使用メモリ 41,688 KB
最終ジャッジ日時 2024-12-14 09:38:42
合計ジャッジ時間 6,026 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		int ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		for (int i = 1; i < N + 1; ++i) {
			ans += i;
		}
		System.out.println(ans);
	}
}
0