結果
問題 | No.487 2017 Calculation(2017の計算) |
ユーザー |
![]() |
提出日時 | 2021-09-10 18:06:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 3,722 ms |
コンパイル使用メモリ | 229,892 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-11 17:12:08 |
合計ジャッジ時間 | 3,879 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
#include <bits/stdc++.h>#include<atcoder/all>using namespace std;using namespace atcoder;using ll=long long;ll mod=1000000007;ll INF=1LL<<60;int main() {int M;cin >> M;mod=M;int P=2017%mod;cout << (P+pow_mod(P*P%mod,2017,mod))%mod << endl;}