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