結果
| 問題 |
No.8081 HQ9+
|
| コンテスト | |
| ユーザー |
da_ab
|
| 提出日時 | 2021-04-01 23:27:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 294 bytes |
| コンパイル時間 | 343 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 44,556 KB |
| 最終ジャッジ日時 | 2024-12-21 07:16:48 |
| 合計ジャッジ時間 | 13,960 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 15 WA * 6 |
ソースコード
# 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)
da_ab