結果

問題 No.8081 HQ9+
ユーザー roaris
提出日時 2021-04-01 21:02:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 146 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 59,880 KB
最終ジャッジ日時 2024-12-21 04:58:52
合計ジャッジ時間 2,114 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
x = -1

for i in range(N+1):
    if i*i==N:
        x = i

if x==-1 or S!='Q'*N:
    print(-1)
else:
    print('Q'*x)
0