結果

問題 No.3081 HQ9+
ユーザー chineristACchineristAC
提出日時 2021-04-01 20:40:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 76,512 KB
最終ジャッジ日時 2023-08-23 02:02:58
合計ジャッジ時間 3,219 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 75 ms
76,164 KB
testcase_04 AC 76 ms
75,932 KB
testcase_05 AC 76 ms
76,164 KB
testcase_06 AC 75 ms
76,228 KB
testcase_07 AC 78 ms
75,988 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 79 ms
76,008 KB
testcase_12 AC 78 ms
76,156 KB
testcase_13 AC 76 ms
75,968 KB
testcase_14 AC 78 ms
76,176 KB
testcase_15 AC 77 ms
76,124 KB
testcase_16 AC 78 ms
75,844 KB
testcase_17 AC 78 ms
76,340 KB
testcase_18 AC 78 ms
75,980 KB
testcase_19 AC 78 ms
76,116 KB
testcase_20 AC 78 ms
75,984 KB
testcase_21 AC 79 ms
76,000 KB
testcase_22 AC 80 ms
75,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0