結果

問題 No.40 多項式の割り算
ユーザー nanophoto12nanophoto12
提出日時 2014-11-15 22:49:59
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 747 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 105,396 KB
実行使用メモリ 24,148 KB
最終ジャッジ日時 2023-08-30 07:04:04
合計ジャッジ時間 6,344 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,748 KB
testcase_01 AC 61 ms
23,716 KB
testcase_02 AC 58 ms
21,728 KB
testcase_03 AC 61 ms
21,712 KB
testcase_04 AC 68 ms
20,048 KB
testcase_05 AC 69 ms
22,052 KB
testcase_06 AC 70 ms
22,132 KB
testcase_07 AC 71 ms
22,116 KB
testcase_08 AC 68 ms
21,912 KB
testcase_09 AC 69 ms
22,068 KB
testcase_10 AC 70 ms
22,176 KB
testcase_11 AC 69 ms
22,000 KB
testcase_12 AC 69 ms
21,928 KB
testcase_13 AC 70 ms
22,320 KB
testcase_14 AC 70 ms
22,060 KB
testcase_15 AC 70 ms
24,076 KB
testcase_16 AC 72 ms
20,280 KB
testcase_17 AC 70 ms
21,952 KB
testcase_18 AC 70 ms
20,080 KB
testcase_19 AC 71 ms
20,188 KB
testcase_20 AC 69 ms
19,908 KB
testcase_21 AC 69 ms
21,868 KB
testcase_22 AC 69 ms
23,948 KB
testcase_23 AC 69 ms
21,992 KB
testcase_24 AC 70 ms
24,148 KB
testcase_25 AC 60 ms
21,768 KB
testcase_26 AC 60 ms
21,528 KB
testcase_27 AC 61 ms
21,668 KB
testcase_28 RE -
testcase_29 AC 61 ms
21,608 KB
testcase_30 AC 63 ms
23,796 KB
testcase_31 AC 62 ms
21,728 KB
testcase_32 AC 62 ms
21,708 KB
testcase_33 AC 61 ms
21,676 KB
testcase_34 AC 61 ms
19,828 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.Linq;

internal class Program
{
    public static void Main(string[] args)
    {
        var d = int.Parse(Console.ReadLine());
        var nums = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        for (int i = d; i >= 3; i--)
        {
            nums[i - 2] += nums[i];
            nums[i] = 0;
        }
        int modD = 0;
        for (int i = 2; i >= 0; i--)
        {
            if (nums[i] != 0)
            {
                modD = i;
                break;
            }
        }
        Console.WriteLine(modD);
        for (int i = 0; i < modD; i++)
        {
            Console.Write(nums[i] + " ");
        }
        Console.WriteLine(nums[modD]);
    }
}
0