dota-The Battle of the King. Time limit:1000ms Memory limit:65536k have questions? Dot here ^_^ The title describes the current DotA prevalence, I believe many students have been playing DotA all night experience, big treasure is no exception. Said Big treasure is known as the DotA big God, is rumored to be the Emperor Sky's apprentice, since the king, since the debut has not been a defeat. Of course, the fame of Da Bao brought him many challengers, but they were all escaped by the mask of the great treasure abuse. This day, big treasure ushered in a special challenger, carried out a special game, will there be a special outcome?
The challenger puts forward the rules of the game: Two men choose a hero to destroy the enemy tower. Assuming that there are N towers, two people take turns, each time can destroy up to M tower, at least 1 (in the destruction of [1, M] towers when the hero is invincible, but more than will be immediately killed! )。 When a man does not have a protective tower to destroy, he loses.Of course, the fame of the big treasure will certainly let the challenger start first. Do you think the myth that big treasure will remain undefeated today? Enter multiple sets of data to be processed to the end of the file. Each group of data has two values, N and M. (0 < M < N, n <= 2147483647) output if Da Bao can continue his unbeaten myth, output "Orz Dota God", otherwise output "A new Star Rise". Example input
5 32 1
Sample output
A new Star Riseorz Dota God
Hint Source von Sample program
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include < String.h>using namespace Std;int Main () { long long int n,m; while (scanf ("%lld%lld", &n,&m)!=eof) { if (n% (m+1) = = 0) { printf ("Orz Dota god\n"); } else { printf ("A new Star rise\n"); } }
Sdut 2084 dota-The Battle of the People King (game theory)