結果

問題 No.1089 三変数方程式
ユーザー RISE70226821
提出日時 2020-08-04 13:55:56
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 1,960 ms
コンパイル使用メモリ 74,044 KB
実行使用メモリ 41,460 KB
最終ジャッジ日時 2024-09-14 14:52:30
合計ジャッジ時間 5,012 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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