結果

問題 No.72 そろばん Med
ユーザー ぴろずぴろず
提出日時 2014-12-11 15:59:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 2,151 ms
コンパイル使用メモリ 74,468 KB
実行使用メモリ 41,692 KB
最終ジャッジ日時 2024-05-01 08:34:49
合計ジャッジ時間 5,726 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
41,188 KB
testcase_01 AC 106 ms
41,140 KB
testcase_02 AC 104 ms
40,300 KB
testcase_03 AC 99 ms
41,608 KB
testcase_04 AC 111 ms
41,264 KB
testcase_05 AC 104 ms
41,132 KB
testcase_06 AC 116 ms
41,132 KB
testcase_07 AC 116 ms
41,552 KB
testcase_08 AC 115 ms
41,340 KB
testcase_09 AC 99 ms
41,360 KB
testcase_10 AC 107 ms
41,368 KB
testcase_11 AC 112 ms
41,304 KB
testcase_12 AC 114 ms
41,692 KB
testcase_13 AC 115 ms
41,564 KB
testcase_14 AC 119 ms
41,288 KB
testcase_15 AC 108 ms
41,060 KB
testcase_16 AC 118 ms
41,448 KB
testcase_17 AC 112 ms
41,288 KB
testcase_18 AC 108 ms
41,632 KB
testcase_19 AC 94 ms
41,128 KB
testcase_20 AC 96 ms
41,384 KB
testcase_21 AC 99 ms
41,464 KB
testcase_22 AC 100 ms
41,516 KB
testcase_23 AC 110 ms
41,384 KB
testcase_24 AC 106 ms
41,404 KB
testcase_25 AC 110 ms
41,456 KB
testcase_26 AC 115 ms
41,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no072;

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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger n = new BigInteger(sc.next());
		BigInteger half = n.divide(new BigInteger("2"));
		System.out.println(
				half.add(BigInteger.ONE).multiply(n.subtract(half).add(BigInteger.ONE)).subtract(BigInteger.ONE)
				.remainder(new BigInteger("1000007"))
				);
	}

}
0