結果

問題 No.72 そろばん Med
ユーザー yuki2006yuki2006
提出日時 2014-11-18 21:33:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 455 bytes
コンパイル時間 2,801 ms
コンパイル使用メモリ 73,924 KB
実行使用メモリ 41,708 KB
最終ジャッジ日時 2024-05-01 08:25:58
合計ジャッジ時間 6,586 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,392 KB
testcase_01 AC 111 ms
41,252 KB
testcase_02 AC 103 ms
41,564 KB
testcase_03 AC 97 ms
41,448 KB
testcase_04 AC 119 ms
41,124 KB
testcase_05 AC 105 ms
41,228 KB
testcase_06 AC 111 ms
41,640 KB
testcase_07 AC 104 ms
41,232 KB
testcase_08 AC 113 ms
41,444 KB
testcase_09 AC 111 ms
41,620 KB
testcase_10 AC 115 ms
41,488 KB
testcase_11 AC 113 ms
41,624 KB
testcase_12 AC 114 ms
41,536 KB
testcase_13 AC 118 ms
41,396 KB
testcase_14 AC 114 ms
39,984 KB
testcase_15 AC 114 ms
41,676 KB
testcase_16 AC 113 ms
41,172 KB
testcase_17 AC 112 ms
41,096 KB
testcase_18 AC 119 ms
41,296 KB
testcase_19 AC 111 ms
41,264 KB
testcase_20 AC 102 ms
41,132 KB
testcase_21 AC 106 ms
41,180 KB
testcase_22 AC 114 ms
41,556 KB
testcase_23 AC 108 ms
41,212 KB
testcase_24 AC 104 ms
41,560 KB
testcase_25 AC 96 ms
41,708 KB
testcase_26 AC 98 ms
40,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yuki072 {
    public static void main(String[] args) {
        Yuki072 hoge = new Yuki072();
    }

    Yuki072() {
        Scanner scanner = new Scanner(System.in);
        long N = scanner.nextLong();
        long mod = 1000007L;

        long i = N / 2;
        long tmp = ((i + 1) % mod) * ((N - i) % mod);
        tmp = (i % mod) + tmp % mod;
        System.out.println(tmp % mod);
    }

}
0