結果
問題 |
No.805 UMG
|
ユーザー |
![]() |
提出日時 | 2019-03-22 21:50:22 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 203 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 82,144 KB |
実行使用メモリ | 72,364 KB |
最終ジャッジ日時 | 2024-11-18 13:18:53 |
合計ジャッジ時間 | 2,350 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 RE * 19 |
ソースコード
n = int(input()) s = input() ans = 0 for i in range(n): if s[i] == "M": for j in range(1, min(i+1, n-i+1)): if s[i-j] == "U" and s[i+j] == "G": ans += 1 print(ans)