結果

問題 No.3081 HQ9+
ユーザー da_abda_ab
提出日時 2021-04-01 23:27:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 29,676 KB
最終ジャッジ日時 2023-08-23 06:49:55
合計ジャッジ時間 5,449 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 130 ms
29,572 KB
testcase_05 AC 130 ms
29,524 KB
testcase_06 AC 127 ms
29,396 KB
testcase_07 AC 130 ms
29,324 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 130 ms
29,504 KB
testcase_12 AC 128 ms
29,504 KB
testcase_13 AC 127 ms
29,568 KB
testcase_14 AC 130 ms
29,540 KB
testcase_15 AC 127 ms
29,376 KB
testcase_16 AC 127 ms
29,440 KB
testcase_17 AC 127 ms
29,544 KB
testcase_18 AC 130 ms
29,596 KB
testcase_19 AC 129 ms
29,560 KB
testcase_20 AC 130 ms
29,540 KB
testcase_21 AC 131 ms
29,348 KB
testcase_22 AC 128 ms
29,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 3081 : HQ9+

import numpy as np
from sys import stdin

output=stdin.readline().rstrip('\n')
output=sorted(list(output))
if output[0]!='Q' or output[len(output)-1]!='Q':
    code=-1
elif np.sqrt(len(output)).is_integer():
    code='Q'*int(np.sqrt(len(output)))
else:
    code=-1
print(code)


0