結果

問題 No.688 E869120 and Constructing Array 2
ユーザー johnjohn
提出日時 2018-06-22 22:11:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 8,116 KB
最終ジャッジ日時 2023-09-21 20:55:02
合計ジャッジ時間 2,961 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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
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
for k in range(0,j):
    print('0', end="")
for l in range(0,i):
    print('1', end="")
print()
0