結果
問題 | No.805 UMG |
ユーザー |
![]() |
提出日時 | 2024-09-18 18:44:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 241 ms / 2,000 ms |
コード長 | 141 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 81,780 KB |
実行使用メモリ | 75,852 KB |
最終ジャッジ日時 | 2024-09-18 18:44:08 |
合計ジャッジ時間 | 3,719 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
n=int(input()) s=input() c=0 for i in range(n): for j in range(1,n+1): if 0<=i-j and i+j<n and s[i-j]+s[i]+s[i+j]=="UMG": c+=1 print(c)