Bestcoder, put the plates.

Source: Internet
Author: User

Put the plates.accepts:113submissions:242Time limit:2000/1000 MS (java/others)Memory limit:65536/65536 K (java/others) Problem Description

The cubs are fond of mischief. Today he presented a ESU game to the visitors. He and his visitors took turns to put plates in a regular polygon. The last dish is the winner, who will win a kiss from the loser. After playing two times, the Cubs found that the visitors were aware of the game's winning strategy. Now the little bear is always the initiator, and he wants to know if he can win.

Note that the plate cannot intersect or intersect the polygon and cannot be placed outside the polygon. In other words, the point inside the plate cannot be outside the polygon or inside the plate.

Input

First line an integer TTT Said TTT Group data. Each set of data contains 3 Numbern,a,r (4≤n≤100,0<a<1000,0<r<1000) n,a,r (4 \leq n \leq 100,0 < A < 1000,0 < R < $)N,a,R(4≤N≤100,0<a<1000,0<R<1000)

nnn is even, representing the number of sides of the polygon, AAa Represents the edge length of a positive polygon, RRR Represents the radius of the plate.

Output

For each set of data, first one line is output

Case #i:

The result is then output. If the small bear wins, output "Give me a kiss!" otherwise output "I want to Kiss you!"

Sample InputCopy
24 50 2.54) 5.5 3
Sample OutputCopy
Case #1: Give me a kiss! Case #2: I want to kiss you! Hint in the first set of samples, the small Xiangxian placed a plate in the middle of the polygon, and then, regardless of how the visitor put it, the Cubs were able to win by symmetrically placing the polygon center with the visitor's plate.
#include <stdio.h> #include <math.h> #define P 3.1415926int Main () {    int t,n;    Double a,r;    scanf ("%d", &t);    int g=0;    while (t--)    {        scanf ("%d%lf%lf", &n,&a,&r);        Double L;        L= (a/2.0)/(Tan (P/n));//The RADIUS formula of the positive polygon inscribed Circle        if (r<l)        {            g++;            printf ("Case #%d:\n", g);            printf ("Give me a kiss!\n");        }        else        {            g++;            printf ("Case #%d:\n", g);            printf ("I want to Kiss you!\n");}}}    

Bestcoder, put the plates.

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.