結果
問題 | No.688 E869120 and Constructing Array 2 |
ユーザー | O2MT |
提出日時 | 2020-12-15 20:44:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 81,696 KB |
実行使用メモリ | 75,612 KB |
最終ジャッジ日時 | 2023-10-20 06:32:25 |
合計ジャッジ時間 | 1,964 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
53,528 KB |
testcase_01 | AC | 45 ms
59,252 KB |
testcase_02 | AC | 62 ms
67,640 KB |
testcase_03 | AC | 86 ms
73,404 KB |
testcase_04 | AC | 64 ms
69,696 KB |
testcase_05 | AC | 83 ms
75,608 KB |
testcase_06 | AC | 82 ms
75,608 KB |
testcase_07 | AC | 46 ms
59,260 KB |
testcase_08 | AC | 70 ms
72,260 KB |
testcase_09 | WA | - |
testcase_10 | AC | 50 ms
61,488 KB |
testcase_11 | AC | 53 ms
61,488 KB |
testcase_12 | AC | 54 ms
63,548 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) 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()