結果

問題 No.1089 三変数方程式
ユーザー RISE70226821RISE70226821
提出日時 2020-08-04 13:55:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 1,816 ms
コンパイル使用メモリ 71,564 KB
実行使用メモリ 56,412 KB
最終ジャッジ日時 2023-10-12 16:14:02
合計ジャッジ時間 5,015 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,824 KB
testcase_01 AC 118 ms
56,240 KB
testcase_02 AC 117 ms
56,148 KB
testcase_03 AC 118 ms
55,692 KB
testcase_04 AC 119 ms
56,228 KB
testcase_05 AC 115 ms
55,876 KB
testcase_06 AC 115 ms
56,096 KB
testcase_07 AC 118 ms
55,520 KB
testcase_08 AC 119 ms
55,856 KB
testcase_09 AC 115 ms
55,736 KB
testcase_10 AC 119 ms
55,820 KB
testcase_11 AC 121 ms
56,156 KB
testcase_12 AC 121 ms
56,412 KB
testcase_13 AC 119 ms
56,156 KB
testcase_14 AC 119 ms
56,168 KB
testcase_15 AC 120 ms
56,372 KB
testcase_16 AC 118 ms
55,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		// 入力
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		// 計算
		int result = (N+1 + 1) * (N+1) / 2;
		
		// 出力
		System.out.println(result);
	}
}
0