結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-02-22 21:15:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 1,589 ms |
| コンパイル使用メモリ | 160,812 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-02-22 21:15:33 |
| 合計ジャッジ時間 | 2,712 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include<bits/stdc++.h>
int main() {
//freopen("2025.in","r",stdin);
//freopen("2025.out","w",stdout);
std::ios::sync_with_stdio(false),std::cin.tie(nullptr);
int m,ans=1; const int K=2017; std::cin>>m;
for(int i=1;i<=K;i++) ans=1ll*ans*K*K%m;
std::cout<<(ans+K)%m;
return 0;
}
vjudge1