結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-07 21:21:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 373 bytes |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-25 02:01:16 |
| 合計ジャッジ時間 | 1,232 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 1 |
ソースコード
k = int(input())
if k == 0:
print(0)
exit()
for i in range(2, 31):
ANS = [1 for _ in range(i)]
cnt = i * (i - 1) // 2
if cnt == k:
print(len(ANS))
print(*ANS)
exit()
for j in range(1, 31 - i):
ANS.append(0)
cnt *= 2
if cnt == k:
print(len(ANS))
print(*ANS)
exit()