結果
問題 | No.790 ちきんの括弧並べ |
ユーザー | 大橋佐和 |
提出日時 | 2022-05-06 19:17:11 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 288 bytes |
コンパイル時間 | 461 ms |
コンパイル使用メモリ | 86,880 KB |
実行使用メモリ | 77,464 KB |
最終ジャッジ日時 | 2023-09-19 08:27:29 |
合計ジャッジ時間 | 5,771 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,096 KB |
testcase_01 | AC | 77 ms
71,384 KB |
testcase_02 | AC | 73 ms
71,432 KB |
testcase_03 | AC | 87 ms
76,696 KB |
testcase_04 | AC | 92 ms
76,708 KB |
testcase_05 | AC | 114 ms
77,188 KB |
testcase_06 | AC | 200 ms
77,464 KB |
testcase_07 | AC | 562 ms
77,268 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
n = int(input()) a = 0 for i in range(1 << 2 * n): if bin(i).count("1") != n: continue s = 0 for j in range(2 * n): if i >> j & 1: s += 1 else: s -= 1 if s < 0: break if s == 0: a += 1 print(a)