結果

問題 No.40 多項式の割り算
ユーザー skewesskewes
提出日時 2016-01-02 15:10:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 984 bytes
コンパイル時間 2,250 ms
コンパイル使用メモリ 111,668 KB
実行使用メモリ 24,908 KB
最終ジャッジ日時 2023-10-19 13:33:15
合計ジャッジ時間 4,706 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,132 KB
testcase_01 AC 27 ms
24,132 KB
testcase_02 AC 27 ms
24,128 KB
testcase_03 AC 26 ms
24,136 KB
testcase_04 AC 33 ms
24,744 KB
testcase_05 AC 33 ms
24,776 KB
testcase_06 AC 33 ms
24,892 KB
testcase_07 AC 34 ms
24,908 KB
testcase_08 AC 31 ms
24,512 KB
testcase_09 AC 32 ms
24,764 KB
testcase_10 AC 33 ms
24,888 KB
testcase_11 AC 32 ms
24,724 KB
testcase_12 AC 32 ms
24,648 KB
testcase_13 AC 33 ms
24,884 KB
testcase_14 AC 33 ms
24,748 KB
testcase_15 AC 33 ms
24,748 KB
testcase_16 AC 34 ms
24,888 KB
testcase_17 AC 32 ms
24,624 KB
testcase_18 AC 33 ms
24,812 KB
testcase_19 AC 34 ms
24,908 KB
testcase_20 AC 33 ms
24,716 KB
testcase_21 AC 33 ms
24,588 KB
testcase_22 AC 32 ms
24,580 KB
testcase_23 AC 33 ms
24,712 KB
testcase_24 AC 34 ms
24,776 KB
testcase_25 AC 26 ms
24,132 KB
testcase_26 AC 27 ms
24,136 KB
testcase_27 AC 26 ms
24,136 KB
testcase_28 AC 26 ms
24,128 KB
testcase_29 AC 27 ms
24,132 KB
testcase_30 AC 27 ms
24,136 KB
testcase_31 AC 27 ms
24,136 KB
testcase_32 AC 26 ms
24,136 KB
testcase_33 AC 27 ms
24,136 KB
testcase_34 AC 26 ms
24,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class _040
    {
        static void Main()
        {
            int d = int.Parse(Console.ReadLine());
            int[] c = Array.ConvertAll(Console.ReadLine().Split(' ')
                , x => int.Parse(x));

            for (int i = d; i >= 3; i--)
            {
                c[i - 2] += c[i];
            }

            int od = 0;
            string b = "";
            int m = Math.Min(2, c.Length - 1);
            for (int i = m; i >= 0; i--)
            {
                if (c[i] != 0)
                {
                    if (od == 0)
                    {
                        od = i;
                    }
                }
                if (od != 0 || c[i] != 0)
                {
                    b = c[i] + " " + b;
                }
            }
            if (b == "")
            {
                b = "0";
            }

            Console.WriteLine(od);
            Console.WriteLine(b);
        }
    }
}
0