結果
| 問題 |
No.8081 HQ9+
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-01 20:40:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 189 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 82,396 KB |
| 実行使用メモリ | 60,844 KB |
| 最終ジャッジ日時 | 2024-12-20 03:08:18 |
| 合計ジャッジ時間 | 2,161 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)