結果
問題 |
No.805 UMG
|
ユーザー |
![]() |
提出日時 | 2019-03-17 16:07:32 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 248 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 81,636 KB |
実行使用メモリ | 68,672 KB |
最終ジャッジ日時 | 2024-11-18 13:09:40 |
合計ジャッジ時間 | 2,498 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 RE * 19 |
ソースコード
def solve() : N = int(input()) S = input() ans = 0 for i in range(N) : if S[i]!='U' : continue K = (N-i)//2 for j in range(K+1) : if S[i+j]=='M' and S[i+2*j]=='G' : ans+=1 print(ans) solve()