結果

問題 No.1219 Mancala Combo
ユーザー bluemeganebluemegane
提出日時 2020-09-05 11:31:07
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 577 bytes
コンパイル時間 1,602 ms
コンパイル使用メモリ 65,580 KB
実行使用メモリ 43,764 KB
最終ジャッジ日時 2023-08-18 17:29:31
合計ジャッジ時間 6,510 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
20,632 KB
testcase_01 AC 51 ms
20,620 KB
testcase_02 AC 55 ms
22,708 KB
testcase_03 AC 48 ms
20,644 KB
testcase_04 AC 65 ms
22,856 KB
testcase_05 AC 55 ms
20,768 KB
testcase_06 AC 55 ms
22,688 KB
testcase_07 AC 59 ms
20,664 KB
testcase_08 AC 59 ms
20,716 KB
testcase_09 AC 56 ms
20,744 KB
testcase_10 AC 54 ms
20,668 KB
testcase_11 AC 65 ms
20,808 KB
testcase_12 AC 57 ms
22,620 KB
testcase_13 AC 65 ms
22,788 KB
testcase_14 AC 57 ms
20,628 KB
testcase_15 AC 57 ms
20,640 KB
testcase_16 AC 59 ms
20,712 KB
testcase_17 AC 98 ms
34,588 KB
testcase_18 AC 97 ms
35,084 KB
testcase_19 AC 89 ms
27,332 KB
testcase_20 AC 103 ms
33,256 KB
testcase_21 AC 91 ms
26,856 KB
testcase_22 AC 97 ms
33,952 KB
testcase_23 AC 106 ms
35,804 KB
testcase_24 AC 97 ms
27,044 KB
testcase_25 AC 99 ms
27,084 KB
testcase_26 AC 115 ms
35,136 KB
testcase_27 AC 114 ms
36,744 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        getAns(n, a);
    }
    static void getAns(int n, int[] a)
    {
        var t = 0;
        for (int i = n - 1; i >= 0; i--)
        {
            var s = a[i] + t;
            if (s % (i + 1) == 0) { t += s / (i + 1); continue; }
            else { Console.WriteLine("No"); return; }
        }
        Console.WriteLine("Yes");
    }
}
0