Submit | All submissions | Best solutions | Back to list |
Problem hidden
TRITILE - Triangle Tiling |
Problem Statement
Var is trying to find a new geometric shape with an even number of sides. She starts with an equilateral triangle and performs a series of n steps. At each step she adds an equilateral triangle to the outer sides of the shape she already has. Can you tell, if after n steps, her new shape will have even number of sides or not?
Input
First line contains an integer T, denoting the number of test cases. Each test case contains an integer n, denoting the total number of steps she performs.
Output
Print “Yes” if she ends up with a shape that has even number of sides, or print “No”.
Constraints
1 <= T <= 100
1 <= n <= 10 ^ 18
Sample Input
1
1
Sample Output
No
Explanation
Original Triangle
After iteration 1
As you can, see the number of edges is 3, which is odd.
Added by: | Kousik Kumar |
Date: | 2014-03-03 |
Time limit: | 0.200s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ADA95 ASM32 ASM64 GAWK BASH CSHARP C99 CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO HASK ICON ICK LUA NEM NICE NODEJS OCAML PAS-GPC PAS-FPC PERL PERL6 PHP PIKE PRLG-swi SCALA SCM guile SCM qobi SED ST TCL WHITESPACE |
Resource: | Own |