結果

問題 No.8081 HQ9+
コンテスト
ユーザー kit84
提出日時 2021-04-01 21:55:02
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 212 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 157 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-21 06:14:01
合計ジャッジ時間 1,677 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

#N,M = map(int,input().split())
#print(N)

N = int(input())
S = input().rstrip()

if S.count("Q")==1 and \
   "H" not in S and \
   "9" not in S:
	print(S)
else:
	print(-1)
0