結果

問題 No.2185 平方数の下6桁
ユーザー MasKoaTSMasKoaTS
提出日時 2023-01-13 21:33:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 214 ms / 2,000 ms
コード長 935 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 81,548 KB
最終ジャッジ日時 2023-08-26 03:09:09
合計ジャッジ時間 8,887 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 172 ms
80,760 KB
testcase_01 AC 173 ms
81,192 KB
testcase_02 AC 204 ms
81,296 KB
testcase_03 AC 175 ms
81,260 KB
testcase_04 AC 207 ms
81,308 KB
testcase_05 AC 204 ms
81,316 KB
testcase_06 AC 204 ms
81,492 KB
testcase_07 AC 181 ms
81,244 KB
testcase_08 AC 208 ms
81,184 KB
testcase_09 AC 180 ms
81,312 KB
testcase_10 AC 212 ms
81,512 KB
testcase_11 AC 186 ms
81,256 KB
testcase_12 AC 214 ms
81,168 KB
testcase_13 AC 189 ms
81,188 KB
testcase_14 AC 213 ms
81,252 KB
testcase_15 AC 181 ms
81,352 KB
testcase_16 AC 179 ms
81,312 KB
testcase_17 AC 179 ms
81,292 KB
testcase_18 AC 206 ms
81,328 KB
testcase_19 AC 168 ms
81,256 KB
testcase_20 AC 204 ms
81,504 KB
testcase_21 AC 210 ms
81,508 KB
testcase_22 AC 173 ms
81,268 KB
testcase_23 AC 205 ms
81,500 KB
testcase_24 AC 174 ms
81,244 KB
testcase_25 AC 211 ms
81,352 KB
testcase_26 AC 211 ms
81,492 KB
testcase_27 AC 171 ms
81,548 KB
testcase_28 AC 170 ms
81,492 KB
testcase_29 AC 171 ms
81,248 KB
testcase_30 AC 205 ms
81,388 KB
testcase_31 AC 204 ms
81,248 KB
testcase_32 AC 175 ms
81,188 KB
testcase_33 AC 175 ms
81,404 KB
testcase_34 AC 206 ms
81,296 KB
testcase_35 AC 204 ms
81,324 KB
testcase_36 AC 177 ms
81,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from functools import cmp_to_key
import math
import sys
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
sys.setrecursionlimit(10 ** 6)
inp = sys.stdin.readline
input = lambda : inp().rstrip()
getN = lambda : int(inp())
getNs = lambda : map(int, inp().split())
getList = lambda :list(map(int, inp().split()))
getStrs = lambda n : [input() for _ in [0] * n]
def yexit(): print("Yes"); exit(0)
def nexit(): print("No"); exit(0)
pi = 3.141592653589793
mod = 1000000007
MOD = 998244353
INF = 4611686018427387903
dx = [1, 0, -1, 0];	dy = [0, 1, 0, -1]
#di = coll.defaultdict(int)


"""
Main Code
"""

s = input()
k = sum(int(c) * 10 ** (5 - i) for i, c in enumerate(s))

for n in range(10 ** 7):
	n2 = n * n
	if(n2 <= k):
		continue
	if((n2 - k) % 10 ** 6 == 0):
		print("YES")
		exit(0)
print("NO")
0