結果
| 問題 |
No.805 UMG
|
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2020-02-11 12:00:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 123 ms / 2,000 ms |
| コード長 | 167 bytes |
| コンパイル時間 | 252 ms |
| コンパイル使用メモリ | 81,936 KB |
| 実行使用メモリ | 75,640 KB |
| 最終ジャッジ日時 | 2024-11-18 13:57:44 |
| 合計ジャッジ時間 | 2,956 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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