結果

問題 No.1109 調の判定
ユーザー keymoonkeymoon
提出日時 2021-01-15 01:14:38
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 827 bytes
コンパイル時間 3,797 ms
コンパイル使用メモリ 106,428 KB
実行使用メモリ 23,836 KB
最終ジャッジ日時 2023-08-16 09:10:20
合計ジャッジ時間 9,391 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
21,820 KB
testcase_01 AC 67 ms
23,660 KB
testcase_02 AC 66 ms
21,552 KB
testcase_03 AC 64 ms
21,764 KB
testcase_04 AC 66 ms
23,764 KB
testcase_05 AC 65 ms
21,836 KB
testcase_06 AC 65 ms
21,484 KB
testcase_07 AC 66 ms
23,676 KB
testcase_08 AC 65 ms
21,740 KB
testcase_09 AC 66 ms
23,684 KB
testcase_10 AC 66 ms
23,632 KB
testcase_11 AC 66 ms
21,564 KB
testcase_12 AC 66 ms
23,600 KB
testcase_13 AC 67 ms
21,576 KB
testcase_14 AC 66 ms
21,612 KB
testcase_15 AC 67 ms
23,592 KB
testcase_16 AC 66 ms
21,624 KB
testcase_17 AC 66 ms
21,624 KB
testcase_18 AC 65 ms
21,660 KB
testcase_19 AC 66 ms
23,632 KB
testcase_20 AC 66 ms
23,616 KB
testcase_21 AC 66 ms
21,560 KB
testcase_22 AC 66 ms
19,488 KB
testcase_23 AC 65 ms
21,564 KB
testcase_24 AC 66 ms
23,652 KB
testcase_25 AC 65 ms
23,692 KB
testcase_26 AC 66 ms
23,616 KB
testcase_27 AC 65 ms
21,576 KB
testcase_28 AC 66 ms
21,824 KB
testcase_29 AC 67 ms
21,696 KB
testcase_30 AC 65 ms
23,620 KB
testcase_31 AC 66 ms
23,580 KB
testcase_32 AC 65 ms
21,724 KB
testcase_33 AC 66 ms
21,616 KB
testcase_34 AC 66 ms
23,564 KB
testcase_35 AC 65 ms
19,576 KB
testcase_36 AC 66 ms
23,836 KB
testcase_37 AC 67 ms
21,624 KB
testcase_38 AC 65 ms
19,532 KB
testcase_39 AC 65 ms
19,572 KB
testcase_40 AC 66 ms
21,708 KB
testcase_41 AC 65 ms
23,676 KB
testcase_42 AC 66 ms
21,576 KB
testcase_43 AC 66 ms
21,516 KB
testcase_44 AC 66 ms
21,648 KB
testcase_45 AC 65 ms
23,772 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var t = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var d = new[] { 0, 2, 4, 5, 7, 9, 11 };
        int res = -1;
        for (int i = 0; i < 12; i++)
        {
            if (t.Except(d.Select(x => (x + i) % 12)).Any()) continue;
            if (res != -1)
            {
                Console.WriteLine(-1);
                return;
            }
            res = i;
        }
        Console.WriteLine(res);
    }
}
0