結果

問題 No.557 点対称
ユーザー teketeke5000
提出日時 2017-08-15 23:41:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 400 bytes
コンパイル時間 1,344 ms
コンパイル使用メモリ 158,324 KB
実行使用メモリ 13,636 KB
最終ジャッジ日時 2024-10-13 11:08:23
合計ジャッジ時間 4,806 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 TLE * 1 -- * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long

int mod = 1e9 + 7;

int main(void) {
    int n;
    cin >> n;
    ll ans = 4;
    ll temp = 1;
    if (n==1) {
        cout << 2 << endl;
        return 0;
    }
    for (int i=0; i<n/2-1; i++) {
        temp *= 5;
        temp %= mod;
    }
    ans *= temp;
    if (n%2 != 0) ans *= 3;
    cout << ans%mod << endl;
    return 0;
}
0