結果
| 問題 | No.495 (^^*) Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-26 08:08:08 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 23 ms / 2,000 ms |
| + 960µs | |
| コード長 | 313 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2026-09-23 09:06:52 |
| 合計ジャッジ時間 | 1,210 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
from collections import Counter
def main():
S = input()
c = count1(S)
print(" ".join(map(str, c)))
def count1(S):
c = Counter(S[:-1].split(")"))
return c.get("(^^*", 0), c.get("(*^^", 0)
def count2(S):
return S.count("(^^*)"), S.count("(*^^)")
if __name__ == '__main__':
main()