結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-07 21:24:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 1,000 ms |
| コード長 | 338 bytes |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-25 02:08:32 |
| 合計ジャッジ時間 | 1,177 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
k = int(input())
for i in range(1, 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()