結果

問題 No.805 UMG
ユーザー iad_2889
提出日時 2019-05-09 05:59:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 75,524 KB
最終ジャッジ日時 2024-11-18 13:48:12
合計ジャッジ時間 2,375 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 2 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
if set(S)=={"U","M","G"}:
    print(0)
else:
    candidates = ((i,j,k) for i in range(N - 2) for j in range(N -   1) for k in range(N) if i < j < k and j - i == k - j and S   [i] == "U" and S[j] == "M" and S[k] == "G")
    print("PASS")
    count = len(list(candidates))
    print(count)
0