結果

問題 No.557 点対称
ユーザー NoNo
提出日時 2017-08-12 00:01:07
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 936 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 103,040 KB
実行使用メモリ 22,912 KB
最終ジャッジ日時 2024-04-21 00:01:54
合計ジャッジ時間 4,496 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
22,912 KB
testcase_01 RE -
testcase_02 AC 21 ms
17,408 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 AC 22 ms
17,664 KB
testcase_07 RE -
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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();
        }
    }
}
0