結果

問題 No.40 多項式の割り算
ユーザー 6soukiti296soukiti29
提出日時 2017-07-28 00:59:14
言語 Nim
(2.0.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 480 bytes
コンパイル時間 3,148 ms
コンパイル使用メモリ 68,252 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 13:40:04
合計ジャッジ時間 4,349 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 3 ms
4,376 KB
testcase_06 AC 4 ms
4,380 KB
testcase_07 AC 3 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 3 ms
4,376 KB
testcase_10 AC 3 ms
4,376 KB
testcase_11 AC 3 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 4 ms
4,376 KB
testcase_14 AC 3 ms
4,376 KB
testcase_15 AC 3 ms
4,376 KB
testcase_16 AC 3 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 3 ms
4,380 KB
testcase_19 AC 3 ms
4,380 KB
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 3 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 WA -
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 2 ms
4,376 KB
testcase_34 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(9, 5) Warning: The bare except clause is deprecated; use `except CatchableError:` instead [BareExcept]
/home/judge/data/code/Main.nim(25, 1) Warning: The bare except clause is deprecated; use `except CatchableError:` instead [BareExcept]
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import sequtils,strutils
var
    D = stdin.readline.parseInt
    L = stdin.readline.strip.split
    A = newSeq[int](0)
for s in L:
    try:
        A.add(s.parseInt)
    except:
        continue
try:
    for i in countdown(A.high,3):
        A[i - 2] += A[i]
        A[i] = 0
    var
        D2 : int
        b = newSeq[int](0)
    for i in 0..2:
        if A[i] != 0:
            D2 = i
    for i in 0..D2:
        b.add(A[i])
    echo D2
    echo b.join(" ")
except:
    echo -1
0