結果

問題 No.40 多項式の割り算
ユーザー mbanmban
提出日時 2016-12-28 18:39:24
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,359 bytes
コンパイル時間 2,799 ms
コンパイル使用メモリ 104,664 KB
実行使用メモリ 24,392 KB
最終ジャッジ日時 2023-08-21 18:17:05
合計ジャッジ時間 6,506 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 64 ms
23,796 KB
testcase_02 AC 61 ms
21,652 KB
testcase_03 AC 65 ms
21,912 KB
testcase_04 AC 74 ms
22,336 KB
testcase_05 AC 73 ms
20,436 KB
testcase_06 AC 75 ms
24,392 KB
testcase_07 AC 75 ms
22,388 KB
testcase_08 AC 71 ms
22,100 KB
testcase_09 AC 73 ms
22,468 KB
testcase_10 AC 73 ms
22,424 KB
testcase_11 AC 72 ms
22,424 KB
testcase_12 AC 73 ms
22,232 KB
testcase_13 AC 74 ms
22,360 KB
testcase_14 AC 73 ms
24,264 KB
testcase_15 AC 72 ms
22,460 KB
testcase_16 AC 73 ms
20,384 KB
testcase_17 AC 73 ms
20,124 KB
testcase_18 AC 74 ms
24,324 KB
testcase_19 AC 75 ms
22,396 KB
testcase_20 AC 75 ms
20,280 KB
testcase_21 AC 74 ms
24,120 KB
testcase_22 AC 74 ms
22,196 KB
testcase_23 AC 73 ms
20,156 KB
testcase_24 AC 74 ms
24,292 KB
testcase_25 AC 64 ms
19,820 KB
testcase_26 AC 64 ms
21,792 KB
testcase_27 AC 65 ms
23,928 KB
testcase_28 RE -
testcase_29 AC 64 ms
19,828 KB
testcase_30 AC 65 ms
23,844 KB
testcase_31 AC 66 ms
21,856 KB
testcase_32 WA -
testcase_33 AC 65 ms
21,920 KB
testcase_34 AC 65 ms
23,840 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.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{

    static void Main()
    {
        int D = int.Parse(Console.ReadLine());
        int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        if (D == 0)
        {
            Console.WriteLine("0\n0");
        }
        if (D < 3)
        {
            Console.WriteLine(D);
            for(int i = 0; i < D; i++)
            {
                Console.Write(a[i]+" ");

            }
            Console.Write(a[D] + "\n");
        }
        for(int i = D; i >=3; i--)
        {
            a[i - 2] += a[i];
            a[i] = 0;
        }
        bool aa = false;
        string ans = "";
        int DD=0;
        int aaa = a[0];
        int bbb = a[1];
        int ccc = a[2];
        if (ccc == 0)
        {
            if (bbb == 0)
            {
                Console.WriteLine(0);
                Console.WriteLine(aaa);
            }
            else
            {
                Console.WriteLine(1);
                Console.WriteLine("{0} {1}", aaa, bbb);
            }
        }
        else
        {
            Console.WriteLine(2);
            Console.WriteLine("{0} {1} {2}", aaa, bbb, ccc);
        }
    }
}



0