結果
問題 | No.487 2017 Calculation(2017の計算) |
ユーザー |
![]() |
提出日時 | 2024-09-30 00:18:01 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 1,133 ms |
コンパイル使用メモリ | 100,448 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-30 00:18:03 |
合計ジャッジ時間 | 1,920 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
#include<iostream>#include<vector>#include<algorithm>using namespace std;using ll = long long;#include<atcoder/modint>using mint = atcoder::modint;int main(){cin.tie(nullptr);ios::sync_with_stdio(false);int m;cin>>m;mint::set_mod(m);mint ans = 2017;ans = ans + ((ans*ans).pow(2017));cout<<ans.val()<<endl;}