Nobita's Crush
Practice
5 (1 votes)
A
Easy
Math
Problem
24% Success 309 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Nobita has a crush on Shizuka and wants to impress her. But Dekisugi wants to ruin his plans... 

The two of them go to Gian's shop to buy bangals for her.

There are \(n\) bangals initially. Gian allows each of them to take \(k\) bangals turn by turn until there are no bangals left. Nobita has the first turn.

The last person that is able to take \(k\) bangals wins Shizuka's heart. 

Your job is to tell us who wins Shizuka's heart.

Consider the Sample Testcase for a better understanding.

Input Format:

First line contains number of testcases \(T\)

Next \(T\) lines contains two space separated integers \(n\) and \(k\).

Constraints:

\(1 \le T \le 10^{5}\)

\(1 \le k \le n \le 10^{18}\)

Output Format:

For each testcase, print "Nobita" (without quotes) if Nobita wins, otherwise print "Dekisugi".

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
56 votes
Tags:
Ad-HocEasyMath
Points:20
111 votes
Tags:
MathematicsEasyMathematicsMathamatics
Points:20
32 votes
Tags:
EasyMath BasicPrime FactorizationBasic MatheasyMathematicsOpen