結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-24 14:17:11 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 111 ms / 2,000 ms |
| コード長 | 168 bytes |
| 記録 | |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 77,484 KB |
| 最終ジャッジ日時 | 2025-12-04 01:32:12 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#yuki805
n=int(raw_input())
s=raw_input()
res=0
for i in xrange(n):
if s[i]=='U':
for j in xrange(i,n,2):
if s[j]=='G' and s[(i+j)/2]=='M':
res+=1
print res