結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| コンテスト | |
| ユーザー |
YoiTaka
|
| 提出日時 | 2017-03-03 22:19:03 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 2,337 ms |
| コンパイル使用メモリ | 105,404 KB |
| 実行使用メモリ | 25,936 KB |
| 最終ジャッジ日時 | 2024-06-22 05:49:54 |
| 合計ジャッジ時間 | 3,472 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 8 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
string line = System.Console.ReadLine().Trim();
int M = int.Parse(line);
int r_x = (2017 * 2017) % M;
for (int i = 0; i < 2016; i++)
{
r_x = (r_x * 2017*2017) % M;
}
r_x = (2017 + r_x) % M;
System.Console.WriteLine(r_x);
}
}
YoiTaka