結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2020-02-11 12:00:17 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 167 bytes |
| 記録 | |
| コンパイル時間 | 332 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 81,024 KB |
| 最終ジャッジ日時 | 2026-05-13 01:51:35 |
| 合計ジャッジ時間 | 2,626 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n = int(input())
s = input()
cnt = 0
for i in range(n-2):
for j in range(1, (n-i+1)//2):
if s[i]+s[i+j]+s[i+j*2] == 'UMG':
cnt += 1
print(cnt)
r_ishida