結果

問題 No.40 多項式の割り算
ユーザー keymoonkeymoon
提出日時 2020-02-07 18:21:43
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 757 bytes
コンパイル時間 1,127 ms
コンパイル使用メモリ 110,320 KB
実行使用メモリ 26,264 KB
最終ジャッジ日時 2023-10-25 23:12:30
合計ジャッジ時間 3,243 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 33 ms
25,512 KB
testcase_02 AC 32 ms
25,356 KB
testcase_03 AC 34 ms
25,528 KB
testcase_04 WA -
testcase_05 AC 38 ms
26,132 KB
testcase_06 AC 39 ms
26,248 KB
testcase_07 AC 39 ms
26,264 KB
testcase_08 AC 37 ms
25,868 KB
testcase_09 AC 39 ms
26,120 KB
testcase_10 AC 39 ms
26,244 KB
testcase_11 AC 38 ms
26,080 KB
testcase_12 AC 37 ms
26,004 KB
testcase_13 AC 40 ms
26,240 KB
testcase_14 AC 39 ms
26,104 KB
testcase_15 AC 38 ms
26,104 KB
testcase_16 AC 39 ms
26,244 KB
testcase_17 AC 37 ms
25,980 KB
testcase_18 AC 39 ms
26,168 KB
testcase_19 AC 40 ms
26,264 KB
testcase_20 AC 38 ms
26,072 KB
testcase_21 AC 38 ms
25,944 KB
testcase_22 AC 38 ms
25,936 KB
testcase_23 AC 38 ms
26,068 KB
testcase_24 AC 38 ms
26,132 KB
testcase_25 AC 33 ms
25,512 KB
testcase_26 AC 33 ms
25,528 KB
testcase_27 AC 33 ms
25,528 KB
testcase_28 AC 32 ms
25,444 KB
testcase_29 AC 32 ms
25,512 KB
testcase_30 AC 32 ms
25,528 KB
testcase_31 AC 32 ms
25,528 KB
testcase_32 AC 32 ms
25,528 KB
testcase_33 AC 32 ms
25,528 KB
testcase_34 AC 32 ms
25,528 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.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 d = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        for (int i = a.Length - 1; i >= 3; i--)
        {
            a[i - 2] += a[i];
            a[i] = 0;
        }
        var res = a.TakeWhile(x => x != 0).ToArray();
        Console.WriteLine(Max(res.Length - 1, 0));
        Console.WriteLine(res.Length == 0 ? "0" : string.Join(" ", res));
    }
}
0