Skip to content

Instantly share code, notes, and snippets.

@ZeronSix
Last active November 3, 2015 14:02
Show Gist options
  • Save ZeronSix/c602498d07116f5fa6be to your computer and use it in GitHub Desktop.
Save ZeronSix/c602498d07116f5fa6be to your computer and use it in GitHub Desktop.
1209. 1, 10, 100, 1000...
import math
n = int(input())
numbers = [int(input()) for _ in range(n)]
for j in range(n):
i = numbers[j]
if (math.sqrt(8 * i - 7)).is_integer():
print(1)
else:
print(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment