結果

問題 No.40 多項式の割り算
ユーザー 6soukiti296soukiti29
提出日時 2017-07-28 09:21:07
言語 Nim
(2.0.2)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 568 bytes
コンパイル時間 3,108 ms
コンパイル使用メモリ 71,228 KB
実行使用メモリ 4,556 KB
最終ジャッジ日時 2023-09-12 13:41:19
合計ジャッジ時間 4,495 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 4 ms
4,376 KB
testcase_06 AC 4 ms
4,380 KB
testcase_07 AC 4 ms
4,536 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 3 ms
4,376 KB
testcase_10 AC 3 ms
4,468 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 3 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 4 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 4 ms
4,380 KB
testcase_19 AC 4 ms
4,556 KB
testcase_20 AC 3 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 3 ms
4,380 KB
testcase_24 AC 3 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 RE -
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 1 ms
4,384 KB
testcase_32 AC 2 ms
4,376 KB
testcase_33 AC 2 ms
4,376 KB
testcase_34 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(19, 1) Warning: The bare except clause is deprecated; use `except CatchableError:` instead [BareExcept]

ソースコード

diff #

import sequtils,strutils

proc asplit(s : string):seq[string]=
    var
        s2 = newSeqWith(1,"")
    for c in s:
        if c != ' ':
            s2[^1] &= c
        else:
            s2.add("")
    return s2
    
var
    D = stdin.readline.parseInt
    A : seq[int]
    L : string
try:
    L = stdin.readline
except:
    L = "2 3 4"
A = L.asplit.map(parseInt)
for i in countdown(D,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(" ")
0