結果
問題 |
No.805 UMG
|
ユーザー |
|
提出日時 | 2019-03-24 14:17:11 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 328 ms / 2,000 ms |
コード長 | 168 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 13:33:34 |
合計ジャッジ時間 | 3,193 ms |
ジャッジサーバーID (参考情報) |
judge3 / 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