結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
Ain48803949
|
| 提出日時 | 2021-07-09 21:57:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 2,000 ms |
| コード長 | 803 bytes |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2024-07-01 16:15:44 |
| 合計ジャッジ時間 | 2,162 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import bisect,collections,copy,heapq,itertools,math,string,sys,queue,time,random
input = lambda: sys.stdin.readline().rstrip()
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return map(int,input().split())
def LIIS(): return list(map(int,input().split()))
def Base_n_to_10(X,n):
out = 0
for i in range(1,len(str(X))+1):
out += int(X[-i])*(n**(i-1))
return out#int out
def Base_10_to_n(X, n):
if (X//n):
return Base_10_to_n(X//n, n)+str(X%n)
return str(X%n)
INF=10**18
MOD=10**9+7
sys.setrecursionlimit(10**8)
##############################################################################
n=II()
ans=0
for x in range(1,n):
#print((n**2-x**2)**0.5)
if ((n**2-x**2)**0.5).is_integer():
ans+=1
print(ans)
Ain48803949