結果
| 問題 | No.8081 HQ9+ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-01 20:40:59 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 84,876 KB |
| 実行使用メモリ | 61,144 KB |
| 最終ジャッジ日時 | 2026-05-27 06:43:54 |
| 合計ジャッジ時間 | 1,619 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 6 |
ソースコード
sq = {i**2:i for i in range(10**4)}
N = int(input())
S = input()
if S.count("Q")!=N:
print(-1)
else:
if N in sq:
n = sq[N]
print("Q"*n)
else:
print(-1)