結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-23 12:05:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 554 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-07 14:19:02 |
| 合計ジャッジ時間 | 1,228 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 2 |
ソースコード
#coding utf-8
#https://yukicoder.me/problems/no/688
#No.688 E869120 and Constructing Array 2
import math
k = int(input())
a = 0
n = 0
i = 0
j = 0
def permutations_count(n,r):
return math.factorial(n) // math.factorial(n - r)
for i in range(0,30):
if i > 1:
n = int(permutations_count(i,2) / 2)
for j in range(0,30):
a = n * (2 ** j)
if a == k:
break
if a == k:
break
print(i + j)
for k in range(0,j):
print('0', end=" ")
for l in range(0,i):
print('1', end=" ")
print()