結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| ユーザー |
rinrinta121
|
| 提出日時 | 2019-04-25 17:41:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 421 bytes |
| コンパイル時間 | 545 ms |
| コンパイル使用メモリ | 74,744 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-20 20:37:45 |
| 合計ジャッジ時間 | 1,139 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 11 |
ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<queue>
#include <climits>
const int mod = 1e9 + 7;
const int INF = 1e9;
using namespace std;
typedef long long ll;
int main()
{
int m;
cin >> m;
int n = 2017 % m;
int k = (n * n) % m;
for(int i = 0 ; i < 2017; i++){
k *= k;
k %= m;
}
cout << (k + 2017) % m;
}
rinrinta121