結果
問題 |
No.557 点対称
|
ユーザー |
![]() |
提出日時 | 2017-08-14 01:09:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 774 bytes |
コンパイル時間 | 568 ms |
コンパイル使用メモリ | 83,348 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-13 09:24:27 |
合計ジャッジ時間 | 3,915 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 28 |
ソースコード
/* -*- coding: utf-8 -*- * * 557.cc: No.557 点対称 - yukicoder */ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<iostream> #include<string> #include<vector> #include<map> #include<set> #include<stack> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<functional> using namespace std; /* constant */ typedef long long ll; const ll MOD = 1000000007; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n; cin >> n; if (n == 1) puts("2"); else { int nh = n / 2; ll p = 4; for (int i = 1; i < nh; i++) p = (p * 5) % MOD; if (n & 1) p = (p * 3) % MOD; printf("%lld\n", p); } return 0; }