結果

問題 No.72 そろばん Med
ユーザー ぴろずぴろず
提出日時 2014-12-11 15:59:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 2,359 ms
コンパイル使用メモリ 71,780 KB
実行使用メモリ 56,092 KB
最終ジャッジ日時 2023-08-13 15:47:32
合計ジャッジ時間 6,865 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,768 KB
testcase_01 AC 115 ms
55,684 KB
testcase_02 AC 116 ms
55,784 KB
testcase_03 AC 116 ms
55,780 KB
testcase_04 AC 115 ms
53,804 KB
testcase_05 AC 116 ms
55,760 KB
testcase_06 AC 115 ms
55,812 KB
testcase_07 AC 116 ms
55,656 KB
testcase_08 AC 117 ms
55,676 KB
testcase_09 AC 117 ms
56,032 KB
testcase_10 AC 116 ms
56,092 KB
testcase_11 AC 117 ms
55,968 KB
testcase_12 AC 116 ms
55,752 KB
testcase_13 AC 117 ms
55,744 KB
testcase_14 AC 116 ms
55,376 KB
testcase_15 AC 116 ms
55,852 KB
testcase_16 AC 119 ms
56,040 KB
testcase_17 AC 116 ms
55,712 KB
testcase_18 AC 119 ms
55,676 KB
testcase_19 AC 117 ms
55,804 KB
testcase_20 AC 118 ms
55,432 KB
testcase_21 AC 119 ms
55,828 KB
testcase_22 AC 118 ms
55,624 KB
testcase_23 AC 120 ms
55,448 KB
testcase_24 AC 121 ms
55,600 KB
testcase_25 AC 118 ms
56,020 KB
testcase_26 AC 118 ms
56,028 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