結果

問題 No.40 多項式の割り算
ユーザー nanophoto12nanophoto12
提出日時 2014-11-15 22:51:51
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 760 bytes
コンパイル時間 2,459 ms
コンパイル使用メモリ 101,312 KB
実行使用メモリ 25,812 KB
最終ジャッジ日時 2023-08-30 07:05:00
合計ジャッジ時間 6,509 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
25,812 KB
testcase_01 AC 61 ms
21,880 KB
testcase_02 AC 61 ms
23,844 KB
testcase_03 AC 63 ms
25,656 KB
testcase_04 AC 70 ms
22,080 KB
testcase_05 AC 71 ms
24,108 KB
testcase_06 AC 72 ms
22,076 KB
testcase_07 AC 73 ms
20,036 KB
testcase_08 AC 69 ms
21,832 KB
testcase_09 AC 70 ms
21,944 KB
testcase_10 AC 71 ms
22,116 KB
testcase_11 AC 72 ms
22,008 KB
testcase_12 AC 70 ms
21,944 KB
testcase_13 AC 71 ms
22,068 KB
testcase_14 AC 69 ms
21,980 KB
testcase_15 AC 70 ms
20,080 KB
testcase_16 AC 71 ms
20,204 KB
testcase_17 AC 69 ms
21,892 KB
testcase_18 AC 72 ms
22,060 KB
testcase_19 AC 72 ms
20,052 KB
testcase_20 AC 71 ms
22,152 KB
testcase_21 AC 70 ms
23,788 KB
testcase_22 AC 71 ms
23,924 KB
testcase_23 AC 70 ms
21,964 KB
testcase_24 AC 70 ms
21,972 KB
testcase_25 AC 62 ms
21,668 KB
testcase_26 AC 61 ms
21,740 KB
testcase_27 AC 62 ms
21,752 KB
testcase_28 AC 62 ms
21,704 KB
testcase_29 AC 61 ms
21,656 KB
testcase_30 AC 60 ms
21,760 KB
testcase_31 AC 61 ms
21,744 KB
testcase_32 AC 61 ms
21,596 KB
testcase_33 AC 62 ms
23,592 KB
testcase_34 AC 61 ms
21,660 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 = Math.Min(2, d); 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