結果

問題 No.557 点対称
ユーザー 0w1
提出日時 2017-09-08 17:19:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 384 bytes
コンパイル時間 2,039 ms
コンパイル使用メモリ 190,812 KB
最終ジャッジ日時 2025-01-05 02:44:46
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 TLE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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

const int MOD = int(1e9) + 7;

long long N;

int main() {
  ios::sync_with_stdio(false);
  cin >> N;
  if (N == 1) {
    cout << 2 << endl;
  } else {
    int ans = 4;
    for (int i = 1; i < N / 2; ++i) { 
      ans = 5LL * ans % MOD;
    }
    if (N & 1) {
      ans = 3LL * ans % MOD;
    }
    cout << ans << endl;
  }
  return 0;
}
0