結果
問題 | No.805 UMG |
ユーザー |
![]() |
提出日時 | 2020-04-10 20:25:23 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,408 KB |
実行使用メモリ | 77,784 KB |
最終ジャッジ日時 | 2024-11-18 13:59:47 |
合計ジャッジ時間 | 5,148 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 RE * 19 |
ソースコード
n = int(input()) s = input() ret = 0 for i in range(n): for j in range(i+1, n+1): for k in range(j+1, n+1): if j-i!=k-j: continue if s[i]=='U' and s[j]=='M' and s[k]=='G': ret += 1 print(ret)