結果

問題 No.457 (^^*)
ユーザー pluto77pluto77
提出日時 2017-02-09 13:56:12
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 751 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 77,588 KB
実行使用メモリ 79,116 KB
最終ジャッジ日時 2023-08-26 20:16:11
合計ジャッジ時間 7,160 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,080 KB
testcase_01 AC 76 ms
76,428 KB
testcase_02 AC 75 ms
76,168 KB
testcase_03 AC 75 ms
76,292 KB
testcase_04 AC 76 ms
76,188 KB
testcase_05 AC 77 ms
76,496 KB
testcase_06 AC 87 ms
78,256 KB
testcase_07 AC 86 ms
78,384 KB
testcase_08 AC 91 ms
78,312 KB
testcase_09 AC 95 ms
78,780 KB
testcase_10 AC 138 ms
79,116 KB
testcase_11 AC 333 ms
78,988 KB
testcase_12 AC 751 ms
79,060 KB
testcase_13 AC 353 ms
78,868 KB
testcase_14 AC 83 ms
78,352 KB
testcase_15 AC 746 ms
79,040 KB
testcase_16 AC 357 ms
78,824 KB
testcase_17 AC 84 ms
78,316 KB
testcase_18 AC 75 ms
76,604 KB
testcase_19 AC 77 ms
76,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_457

def f(ss):
 res=0
 for i in xrange(len(s)):
  k=0
  if s[i]!='(':
   continue
  for j in xrange(i+1,len(s)):
   if s[j]==ss[k%3]:
    k+=1
   if s[j]==')' and k>=3:
    res+=1
 return res

s=raw_input()
print f('^^*'),f('*^^')
0