結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2017-02-24 22:31:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 228 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 56,192 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 22:58:37 |
| 合計ジャッジ時間 | 1,359 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include <iostream>
using namespace std;
int m;
int main() {
cin >> m;
int a = (2017 * 2017) % m;
int x = 1;
for (int i = 0; i < 2017; i++) {
x *= a;
x %= m;
}
x += 2017;
x %= m;
cout << x << endl;
return 0;
}
startcpp