結果

問題 No.72 そろばん Med
ユーザー GrenacheGrenache
提出日時 2015-11-03 21:08:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 382 bytes
コンパイル時間 2,799 ms
コンパイル使用メモリ 75,500 KB
実行使用メモリ 41,676 KB
最終ジャッジ日時 2024-05-01 08:41:21
合計ジャッジ時間 6,571 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
41,248 KB
testcase_01 AC 114 ms
40,160 KB
testcase_02 AC 102 ms
41,252 KB
testcase_03 AC 101 ms
40,432 KB
testcase_04 AC 98 ms
41,676 KB
testcase_05 AC 112 ms
41,440 KB
testcase_06 AC 118 ms
41,400 KB
testcase_07 AC 118 ms
40,352 KB
testcase_08 AC 103 ms
41,332 KB
testcase_09 AC 116 ms
41,468 KB
testcase_10 AC 112 ms
41,272 KB
testcase_11 AC 110 ms
41,664 KB
testcase_12 AC 104 ms
41,540 KB
testcase_13 AC 118 ms
41,236 KB
testcase_14 AC 104 ms
41,388 KB
testcase_15 AC 111 ms
41,528 KB
testcase_16 AC 120 ms
41,268 KB
testcase_17 AC 102 ms
41,572 KB
testcase_18 AC 107 ms
41,232 KB
testcase_19 AC 105 ms
41,628 KB
testcase_20 AC 115 ms
41,480 KB
testcase_21 AC 114 ms
41,352 KB
testcase_22 AC 107 ms
41,440 KB
testcase_23 AC 117 ms
41,412 KB
testcase_24 AC 103 ms
39,984 KB
testcase_25 AC 107 ms
41,616 KB
testcase_26 AC 118 ms
41,252 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