Answers for "Let's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another python solution"

0

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))
Posted by: Guest on November-01-2020

Code answers related to "Let's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another python solution"

Python Answers by Framework

Browse Popular Code Answers by Language