結果

問題 No.688 E869120 and Constructing Array 2
ユーザー pluto77pluto77
提出日時 2018-05-21 12:39:48
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 205 bytes
コンパイル時間 564 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 6,184 KB
最終ジャッジ日時 2023-09-21 20:34:57
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge15 / 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 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki688
import math

def nCr(n,r):
 f=math.factorial
 return f(n)/f(r)/f(n-r)

k=int(raw_input())
for i in xrange(31):
 for j in xrange(2,31-i):
  if (1<<i)*nCr(j,2)==k:
   print i+j
   print '0'*i+'1'*j
0