結果
| 問題 |
No.2185 平方数の下6桁
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-03-26 02:33:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 407 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 54,032 KB |
| 最終ジャッジ日時 | 2025-03-26 02:33:17 |
| 合計ジャッジ時間 | 3,382 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 WA * 10 |
ソースコード
S = input()
def solve():
ds = [int(c) for c in reversed(S)]
def rec(p, ca):
if p == len(ds): return True
for i in range(10): # 割り当てる数字
x = i*i + ca
if ds[p] == x % 10:
ok = rec(p+1, x // 10)
if ok: return True
return False
return rec(0, 0)
if solve():
print('YES')
else:
print('NO')
norioc