結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 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,432 KB
testcase_07 AC 4 ms
4,456 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,380 KB
testcase_13 AC 4 ms
4,376 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 3 ms
4,376 KB
testcase_16 AC 4 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 3 ms
4,380 KB
testcase_19 AC 4 ms
4,572 KB
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 3 ms
4,380 KB
testcase_24 AC 3 ms
4,376 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 RE -
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,376 KB
testcase_33 AC 1 ms
4,380 KB
testcase_34 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

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
L = stdin.readline
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