TRITILE - Triangle Tiling

no tags 

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.


hide comments
octacode: 2017-07-02 19:10:25

I was printing "NO" instead of "No". Duh! It was frustrating

Last edit: 2017-07-02 19:10:49
kspoj: 2017-06-23 16:52:06

The hell even is this?!?!? xD

sagar_zhcet: 2017-06-16 20:57:40

"hello world"... :P

kr123: 2017-01-26 05:07:49

What a crap!

divyaprakash18: 2017-01-21 14:31:52

Felt like "Hello World!! ".. :P

brofreecss: 2016-11-15 04:58:34

:) AC 1 GO :)

aditya_rev: 2016-10-04 10:27:42

wat da hell!! seriously??

aryanagal: 2016-07-12 20:59:00

Only problem easier than this is FIRSTCODE

dushyant_bgs: 2016-07-07 19:52:19

lol!! :-P

mkfeuhrer: 2016-07-06 12:25:35

its not even worth tutorials!! time waste of 5 min :-P


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 clisp LISP sbcl 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