Horje
Let's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another python solution Code Example
Let's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another python solution
import math
import sys

f = lambda x: math.sqrt(2.0 * x + 0.25) - 0.5
g = lambda x: f(x) % 1 == 0

inp = map(int, sys.stdin.read().split()[1:])

print(" ".join("1" if g(x-1) else "0" for x in inp))




Python

Related
dict to csv keys as rows and subkey as columns in python Code Example dict to csv keys as rows and subkey as columns in python Code Example
pandas find inf values Code Example pandas find inf values Code Example
tkinter yt downloader with resolution Code Example tkinter yt downloader with resolution Code Example
keylogger to exe Code Example keylogger to exe Code Example
Convert the below Series to pandas datetime : DoB = pd.Series(["07Sep59","01Jan55","15Dec47","11Jul42"]) Code Example Convert the below Series to pandas datetime : DoB = pd.Series(["07Sep59","01Jan55","15Dec47","11Jul42"]) Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7