結果

問題 No.689 E869120 and Constructing Array 3
ユーザー konsin_tokagekonsin_tokage
提出日時 2018-05-19 09:26:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-09-10 23:39:17
合計ジャッジ時間 2,996 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,764 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 15 ms
7,896 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 15 ms
7,860 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
7,864 KB
testcase_11 WA -
testcase_12 AC 16 ms
7,904 KB
testcase_13 AC 16 ms
7,860 KB
testcase_14 WA -
testcase_15 AC 16 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

k = int(input())
a = i = 0
while a+i <= k:
    a += i
    i += 1
k -= a
c = [1]*i
if k >= 2:
    c += [3,3]
    while k >= 2:
        c.append(8)
        k -= 2
if k == 1:
    c += [5,24]
print(len(c))
print(*c[::-1])
0