結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-05-31 18:25:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 1,000 ms |
| コード長 | 252 bytes |
| コンパイル時間 | 810 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 54,264 KB |
| 最終ジャッジ日時 | 2024-11-17 22:59:23 |
| 合計ジャッジ時間 | 1,538 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
K=int(input())
N=-1
A=-1
for n in range(1,31):
for a in range(n+1):
if 2**(a-1)*(n-a)*(n-a-1)==K:
N,A=n,a
S=""
for i in range(N):
if i<A:
S+="0 "
else:
S+="1 "
print("{}\n{}".format(N,S[:-1]))
Kazun