結果

問題 No.1219 Mancala Combo
ユーザー keymoonkeymoon
提出日時 2020-09-04 21:48:38
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 948 bytes
コンパイル時間 3,095 ms
コンパイル使用メモリ 101,996 KB
実行使用メモリ 40,496 KB
最終ジャッジ日時 2023-08-17 15:24:17
合計ジャッジ時間 5,779 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,696 KB
testcase_01 AC 59 ms
21,680 KB
testcase_02 AC 60 ms
21,784 KB
testcase_03 AC 60 ms
23,700 KB
testcase_04 AC 66 ms
23,816 KB
testcase_05 AC 66 ms
21,788 KB
testcase_06 AC 59 ms
21,744 KB
testcase_07 AC 66 ms
21,776 KB
testcase_08 AC 65 ms
21,776 KB
testcase_09 AC 59 ms
21,816 KB
testcase_10 AC 59 ms
21,640 KB
testcase_11 AC 66 ms
23,772 KB
testcase_12 AC 59 ms
21,644 KB
testcase_13 AC 66 ms
23,764 KB
testcase_14 AC 59 ms
21,776 KB
testcase_15 AC 59 ms
19,640 KB
testcase_16 AC 58 ms
21,680 KB
testcase_17 AC 116 ms
37,512 KB
testcase_18 AC 121 ms
38,056 KB
testcase_19 AC 104 ms
28,232 KB
testcase_20 AC 121 ms
38,364 KB
testcase_21 AC 100 ms
29,704 KB
testcase_22 AC 113 ms
34,916 KB
testcase_23 AC 126 ms
38,808 KB
testcase_24 AC 98 ms
27,876 KB
testcase_25 AC 101 ms
28,040 KB
testcase_26 AC 117 ms
33,904 KB
testcase_27 AC 133 ms
39,616 KB
testcase_28 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        for (int i = 0; i < a.Length; i++)
        {
            if (i + 1 < a[i])
            {
                Console.WriteLine("No");
                return;
            }
        }
        int add = 0;
        for (int i = a.Length - 1; i >= 0; i--)
        {
            if ((a[i] + add) % (i + 1) != 0)
            {
                Console.WriteLine("No");
                return;
            }
            add += (a[i] + add) / (i + 1);
        }
        Console.WriteLine("Yes");
    }
}
0