結果
問題 |
No.684 Prefix Parenthesis
|
ユーザー |
![]() |
提出日時 | 2018-05-12 00:15:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 243 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-06-28 09:14:44 |
合計ジャッジ時間 | 2,659 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 13 |
ソースコード
#!python # -*- coding: utf-8 -*- N = int(input()) S = input() R = 0 L = 0 for i, c in enumerate(S): if c == '(': L += len(S) - i else: R += len(S) - i if S[0] == '(': print(R * 2) if S[0] == ')': print(L * 2)