結果
| 問題 | No.40 多項式の割り算 |
| コンテスト | |
| ユーザー |
skewes
|
| 提出日時 | 2016-01-02 14:56:12 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 858 bytes |
| コンパイル時間 | 1,057 ms |
| コンパイル使用メモリ | 105,984 KB |
| 実行使用メモリ | 19,200 KB |
| 最終ジャッジ日時 | 2024-09-19 09:39:26 |
| 合計ジャッジ時間 | 3,234 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 2 RE * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 = "";
for (int i = 2; i >= 0; i--)
{
if (c[i] != 0)
{
if (od == 0)
{
od = i;
}
b = c[i] + " " + b;
}
}
if (od == 0)
{
b = "0";
}
Console.WriteLine(od);
Console.WriteLine(b);
}
}
}
skewes