結果

問題 No.72 そろばん Med
ユーザー rn4rurn4ru
提出日時 2016-04-14 09:49:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 468 bytes
コンパイル時間 2,066 ms
コンパイル使用メモリ 74,368 KB
実行使用メモリ 41,836 KB
最終ジャッジ日時 2024-05-01 08:45:03
合計ジャッジ時間 5,546 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
41,548 KB
testcase_01 AC 106 ms
41,296 KB
testcase_02 AC 109 ms
41,700 KB
testcase_03 AC 118 ms
41,480 KB
testcase_04 AC 97 ms
41,452 KB
testcase_05 AC 106 ms
41,304 KB
testcase_06 AC 116 ms
41,468 KB
testcase_07 AC 95 ms
40,288 KB
testcase_08 AC 102 ms
41,332 KB
testcase_09 AC 98 ms
39,832 KB
testcase_10 AC 96 ms
41,264 KB
testcase_11 AC 109 ms
41,236 KB
testcase_12 AC 111 ms
41,108 KB
testcase_13 AC 111 ms
41,208 KB
testcase_14 AC 101 ms
41,376 KB
testcase_15 AC 115 ms
41,760 KB
testcase_16 AC 112 ms
41,232 KB
testcase_17 AC 110 ms
41,568 KB
testcase_18 AC 111 ms
41,664 KB
testcase_19 AC 116 ms
41,836 KB
testcase_20 AC 99 ms
41,480 KB
testcase_21 AC 103 ms
41,340 KB
testcase_22 AC 102 ms
41,120 KB
testcase_23 AC 116 ms
41,832 KB
testcase_24 AC 113 ms
41,180 KB
testcase_25 AC 102 ms
41,448 KB
testcase_26 AC 108 ms
41,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		BigInteger N = new BigInteger(scanner.next());
		BigInteger two = new BigInteger("2");
		BigInteger three = new BigInteger("3");
		BigInteger mod = new BigInteger("1000007");
		System.out
				.println((N.add(three).divide(two).multiply(N.add(two).divide(two)).subtract(BigInteger.ONE)).mod(mod));
	}

}
0