結果

問題 No.480 合計
ユーザー 水野嶺水野嶺
提出日時 2020-05-14 11:04:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 450 bytes
コンパイル時間 4,069 ms
コンパイル使用メモリ 72,904 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2023-10-13 03:44:35
合計ジャッジ時間 6,480 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,780 KB
testcase_01 AC 122 ms
55,952 KB
testcase_02 AC 121 ms
55,696 KB
testcase_03 AC 122 ms
56,076 KB
testcase_04 AC 123 ms
55,788 KB
testcase_05 AC 122 ms
56,056 KB
testcase_06 AC 123 ms
55,932 KB
testcase_07 AC 120 ms
55,760 KB
testcase_08 AC 123 ms
55,684 KB
testcase_09 AC 125 ms
55,908 KB
testcase_10 AC 123 ms
56,148 KB
testcase_11 AC 123 ms
56,152 KB
testcase_12 AC 121 ms
55,880 KB
testcase_13 AC 121 ms
55,768 KB
testcase_14 AC 120 ms
55,928 KB
testcase_15 AC 121 ms
56,028 KB
testcase_16 AC 124 ms
55,896 KB
testcase_17 AC 121 ms
56,104 KB
testcase_18 AC 117 ms
55,760 KB
testcase_19 AC 122 ms
54,192 KB
testcase_20 AC 122 ms
55,884 KB
testcase_21 AC 121 ms
55,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		int sum = 0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		for(int i=0;i<=n;i++){
			sum +=i;
		}
		
		System.out.println(sum);
	}
}
0