結果
| 問題 | No.487 2017 Calculation(2017の計算) |
| コンテスト | |
| ユーザー |
samplelpmas
|
| 提出日時 | 2017-04-11 18:56:03 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 1,729 ms |
| コンパイル使用メモリ | 81,812 KB |
| 実行使用メモリ | 128,412 KB |
| 最終ジャッジ日時 | 2026-04-02 00:43:00 |
| 合計ジャッジ時間 | 3,684 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int M = sc.nextInt();
long result = 1;
for (int i = 0; i < 2017; i++) {
result = result * 2017 * 2017 % M;
}
result += 2017;
result %= M;
System.out.println(result);
}
}
samplelpmas