結果
問題 | No.495 (^^*) Easy |
ユーザー |
|
提出日時 | 2017-09-26 08:08:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,904 KB |
最終ジャッジ日時 | 2024-11-15 16:48:16 |
合計ジャッジ時間 | 824 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()