C. Adidas vs Adivon

Source: Internet
Author: User

C. Adidas vs AdivonTime Limit:1000msCase Time Limit:1000msMemory Limit:65536kb64-bit integer IO format:%lldJava class Name:Main

cid=5202# "class=" submitprob button Ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only "style=" margin:0px 0.1em 0px-1px; padding:0px; Text-decoration:none; font-family: ' Trebuchet MS ', Helvetica,arial,sans-serif; Font-size:1.1em; border:1px solid RGB (204,204,204); Background-color:rgb (238,238,238); Font-weight:bold; Color:rgb (68,68,68); Display:inline-block; position:relative; Zoom:1; Overflow:visible ">SubmitStatus pid:29378Font Size: + -

"We sat high above the mound. Listen to mother talk about Adi Wang things. I was born in a less common family, and my mother would have foreseen the technique. When I was young, my mother often said to me: ' In the future world. There is something called Adi Wang that becomes more important than oil and gold ... ' At that time, I listened. A listen to the midnight, hear fascinated. Let the snot flow into your mouth. When I grew up, I finally knew what Adi Wang was. It's a fetish for millions more than their own life ... "

As I know, the daily maintenance of a pair of ordinary di Wang imitation leather shoes is very astonishing, some billionaires bought the products of the king of the product after the failure to bear the daily maintenance costs of the product announced personal bankruptcy.

"I ' m coming!!!"

However, Adidas has never heard of the brand to sue Adivon trademark infringement!

。 This is Adivon fans can not tolerate!!! So on a night in the dark, a noble Adivon fan and a adidas cock silk about the summit of Huashan. As the new youth of the 21st century, they chose the intellectual confrontation, to a game to win.

They took out a piece of paper with a long and wide positive integer, and each time the current party could choose to tear the paper horizontally or vertically into equal halves (parallel raised here edges or wide edges). Throw half. But the rest of the pieces of paper after the tear is long and wide remains a positive integer. The game is lost until one party can no longer tear it.

Adivon's fans are pretty generous. So every time it was Adidas cock silk.

Input

The first line is an integer N (2<=n<=2000), which indicates how many games they have.

Next n rows, two positive integers L and H (1<=l,h<=1000000) per line. Indicates the initial length and width of the board's pieces of paper.

Output

For each game, output one line. Suppose the Adivon fan wins the output "Adivon prevails". Otherwise Adivon fans will start the divine skill. Change the game ending, this kind of situation output "Adidas loses".

Sample Input
21 22 2
Sample Output
Adidas Losesadivon Prevails
#include <stdio.h>int main () {    int n,a,b,k;    scanf ("%d", &n);    while (n--)    {        scanf ("%d%d", &a,&b);        k=0;        while (a%2==0)        {            k++; a/=2;        }        while (b%2==0)        {            k++; b/=2;        }        if (k%2==0) printf ("Adivon prevails\n");        else printf ("Adidas loses\n");}    }


Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

C. Adidas vs Adivon

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.