結果
問題 |
No.557 点対称
|
ユーザー |
![]() |
提出日時 | 2017-08-12 00:01:07 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 936 bytes |
コンパイル時間 | 3,082 ms |
コンパイル使用メモリ | 109,388 KB |
実行使用メモリ | 30,676 KB |
最終ジャッジ日時 | 2024-10-12 22:20:35 |
合計ジャッジ時間 | 4,454 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 1 RE * 4 TLE * 1 -- * 21 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); bool f = false; if (n % 2 == 0) f = true; else f = false; long ans = 1; for (int i = 1; i <= n / 2; i++) { if (i == 1) { ans = ans * 4 % 1000000007; } else { ans = ans * 5 % 1000000007; } } if (n != 2) { if (f) { ans = ans * 5 % 1000000007; } else { ans = ans * 3 % 1000000007; } } Console.WriteLine(ans); Console.ReadLine(); } } }