結果
問題 | No.688 E869120 and Constructing Array 2 |
ユーザー | O2MT |
提出日時 | 2020-12-15 20:44:36 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 150 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 75,580 KB |
最終ジャッジ日時 | 2023-10-20 06:32:27 |
合計ジャッジ時間 | 1,821 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
53,528 KB |
testcase_01 | AC | 45 ms
59,256 KB |
testcase_02 | AC | 58 ms
67,644 KB |
testcase_03 | AC | 69 ms
73,388 KB |
testcase_04 | AC | 61 ms
69,692 KB |
testcase_05 | AC | 77 ms
75,580 KB |
testcase_06 | AC | 75 ms
75,580 KB |
testcase_07 | AC | 42 ms
59,256 KB |
testcase_08 | AC | 65 ms
72,236 KB |
testcase_09 | WA | - |
testcase_10 | AC | 46 ms
61,484 KB |
testcase_11 | AC | 47 ms
61,484 KB |
testcase_12 | AC | 50 ms
63,544 KB |
ソースコード
import math def combinations_count(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) K = int(input()) if K == 0: print(0) print(0) exit() for i in range(31): for j in range(2,31-i): if (2**i)*combinations_count(j,2) == K: print(i+j) print(*([0]*i+[1]*j)) exit()