結果
問題 | No.8081 HQ9+ |
ユーザー |
|
提出日時 | 2022-02-09 23:24:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 189 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-06-25 03:49:48 |
合計ジャッジ時間 | 2,129 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 6 |
ソースコード
n = int(input())s = input()q = s.count('Q')if q != n:print(-1)exit()import mathx = math.floor(q ** 0.5 + 0.0001)if 'Q' * (x * x) != s:print(-1)else:print('Q' * x)