結果

問題 No.72 そろばん Med
ユーザー GrenacheGrenache
提出日時 2015-11-03 21:08:01
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 382 bytes
コンパイル時間 5,145 ms
コンパイル使用メモリ 72,032 KB
実行使用メモリ 56,136 KB
最終ジャッジ日時 2023-08-13 15:53:54
合計ジャッジ時間 8,645 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,708 KB
testcase_01 AC 124 ms
56,120 KB
testcase_02 AC 124 ms
55,980 KB
testcase_03 AC 125 ms
55,732 KB
testcase_04 AC 126 ms
55,484 KB
testcase_05 AC 123 ms
55,808 KB
testcase_06 AC 125 ms
56,096 KB
testcase_07 AC 127 ms
55,516 KB
testcase_08 AC 125 ms
55,700 KB
testcase_09 AC 125 ms
56,016 KB
testcase_10 AC 124 ms
55,932 KB
testcase_11 AC 123 ms
56,088 KB
testcase_12 AC 124 ms
55,520 KB
testcase_13 AC 126 ms
55,688 KB
testcase_14 AC 124 ms
55,708 KB
testcase_15 AC 126 ms
55,964 KB
testcase_16 AC 125 ms
55,744 KB
testcase_17 AC 125 ms
55,692 KB
testcase_18 AC 123 ms
55,648 KB
testcase_19 AC 126 ms
55,908 KB
testcase_20 AC 125 ms
55,644 KB
testcase_21 AC 125 ms
55,516 KB
testcase_22 AC 123 ms
56,136 KB
testcase_23 AC 127 ms
55,868 KB
testcase_24 AC 125 ms
55,676 KB
testcase_25 AC 125 ms
56,032 KB
testcase_26 AC 128 ms
55,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder72 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final long MOD = 1000007;
        long n = sc.nextLong();

        long i = n / 2;
        long max = ((i + 1) % MOD) * ((n - i + 1) % MOD) + MOD - 1;

		System.out.println(max % MOD);
        
        sc.close();
    }
}
0