# DCP-540: Pile game 1 Back to All Problems

Beginner Game Theory > Observations/Pattern finding

Alice and Bob are playing a new pile game. Initially on the table, there are **N** piles. Each time, the player has to take **2^i** piles **(i ≥ 0)**. The winner is the one who takes the last pile. Alice starts first, and you need to find the winner of the game if both of them play optimally well. Input: ------ Input starts with an integer **T (1<=100)**, denoting the number of test cases. Each test case contains an integer **N (1 ≤ N ≤ 10^9)** denoting the number of piles on the table. Output: ------- For each test, print **"First"** if Alice wins, and **"Second"** otherwise. Sample Input ------------ 2 2 3 Sample Output ------------- First Second

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 2.00 Go 2.00 Java 2.00 JavaScript 2.00 Objective-C 2.00 Perl 2.00 PHP 2.00 Python 2.00 Python3 2.00 Ruby 2.00 VB.Net 2.00

# 97/446

Solve/Submission

### Ranking

# User Language Timing
01 prodipdatta7 Cpp14 0.00s
02 hrOarr Cpp 0.00s
03 Towfiq379 Cpp 0.00s
04 PKP_Junior Cpp 0.00s
06 DynamicOvi Cpp 0.00s
07 IIUC_minhazmiraz Cpp14 0.00s
08 dipta007 Cpp 0.00s
09 mahbubcseju Cpp 0.00s
11 Nobel Cpp 0.00s
12 Pure_Protea Cpp14 0.00s
13 Arpan_cse_2k14 Cpp 0.00s
14 subhashis_cse Cpp 0.00s
16 Ishraq_Nibir Cpp 0.00s
17 unknown420 Cpp 0.00s
18 Red_Sparkel Cpp 0.00s
19 sohelcseiu Cpp 0.00s
20 Riaz_BSMRSTU Cpp 0.00s
21 ksohan Cpp 0.00s
22 ssavi Cpp 0.00s
23 Jisancse Cpp 0.00s
24 mh755628 Cpp 0.00s
25 Sarwar05 Cpp 0.00s
26 moshiur_cse15 Cpp 0.00s
27 Shirsho Cpp 0.00s
28 Chucks Cpp 0.00s
29 Urmy_Cse_Brur C 0.00s
30 maf_uu Cpp 0.00s
31 anik_ewu Cpp14 0.00s
32 TheRaihan Cpp 0.00s
33 Ataur Cpp 0.00s
34 nahid08 Cpp 0.00s
35 SHOVON26 Cpp 0.00s
36 ehsan_sshuvo96 Cpp 0.00s
37 robin_aust Cpp 0.00s
38 Arif_Shariar Cpp 0.00s
39 Indrjit_BU Cpp 0.00s
40 mhiceiuk Cpp 0.00s
42 loser_123 Cpp 0.00s
43 Rajan_sust Cpp14 0.00s
44 aaman007 Cpp 0.00s
45 Bruteforcekid Cpp 0.00s
46 Frdhsn Cpp14 0.00s
47 Zayed Cpp 0.00s
48 tariqiitju Cpp 0.00s
49 prateepm Cpp14 0.00s
50 kamran_11b Cpp 0.00s
Feedback