結果

問題 No.557 点対称
ユーザー nebukuro09nebukuro09
提出日時 2017-08-12 00:08:50
言語 D
(dmd 2.106.1)
結果
RE  
実行時間 -
コード長 436 bytes
コンパイル時間 774 ms
コンパイル使用メモリ 99,692 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-03 15:49:13
合計ジャッジ時間 6,123 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 RE -
testcase_02 AC 1 ms
4,376 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 RE -
testcase_08 TLE -
testcase_09 AC 2 ms
4,384 KB
testcase_10 RE -
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 3 ms
4,376 KB
testcase_13 AC 3 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 1,867 ms
4,376 KB
testcase_16 RE -
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 14 ms
4,376 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 5 ms
4,380 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 1 ms
4,384 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

const long MOD = 10^^9+7;

void main() {
    auto N = readln.chomp.to!int;
    long ans = 1;
    foreach (i; 0..N/2) {
        if (i == 0) ans = ans * 4 % MOD;
        else ans = ans * 5 % MOD;
    }

    if (N % 2) ans = ans * 3 % MOD;
    ans.writeln;
}
0