結果
| 問題 | 
                            No.8081 HQ9+
                             | 
                    
| コンテスト | |
| ユーザー | 
                             nasubi24
                         | 
                    
| 提出日時 | 2021-04-01 21:34:11 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 158 bytes | 
| コンパイル時間 | 166 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 53,592 KB | 
| 最終ジャッジ日時 | 2024-12-21 05:53:06 | 
| 合計ジャッジ時間 | 1,932 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 18 WA * 3 | 
ソースコード
n=int(input())
s=input()
if s.count("Q")==1 and s.count("H")==0 and s.count("9")==0:
    print(s)
elif s.count("Q")==n:
    print(s[n+1])
else:
    print(-1)
            
            
            
        
            
nasubi24