CT57216

Tomas's ciphers Ember Takeaway

MediumL6 · Pointer PhantomAcceptance: 0.0%XP: 100

The cartographer Tomas has been asked to map a faster supply route. On the desk lies a long table of ciphers readings. Task: A pile of n stones; players alternately take 1..k stones, last move wins. Print the winner with perfect play: FIRST or SECOND. Input format: One line: n and k. Output format: Print FIRST or SECOND. Constraints: 1 <= n <= 1000000000; 1 <= k <= 10^9.

Example 1:

Input: 497109431 687452843
Output: FIRST

Example 2:

Input: 751845627 225703718
Output: FIRST

Example 3:

Input: 241142878 752133422
Output: FIRST

Constraints:

1 <= n <= 1000000000; 1 <= k <= 10^9.

Loading...
Test Cases:No test cases
No test cases available.
Tomas's ciphers Ember Takeaway - MEDIUM Coding Problem | CodeTikki