logo AlgoBeat OnlineJudge
登录 注册

#213482. [GCJ 2011 #1A] FreeCell Statistics

内存限制:1024 MiB 时间限制:6000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

I played () games of FreeCell today. Each game of FreeCell ends in one of two ways -- I either win, or I lose. I've been playing for many years, and have so far played games in total (obviously, ).

At the end of the day, I look at the game statistics to see how well I have played. It turns out that I have won exactly percent of the games today, and exactly percent of total games I had ever played. Miraculously, there is no rounding necessary -- both percentages are exact! Unfortunately, I don't remember the exact number of games that I have played today (), or the exact number of games that I have played in total (). I do know that I could not have played more than games today ().

Are the percentages displayed possible, or is the game statistics calculator broken?

输入格式

The first line of the input gives the number of test cases, . lines follow. Each line contains 3 integers -- , and .

输出格式

For each test case, output one line containing "Case #: ", where is the case number (starting from 1) and is either "Possible" or "Broken".

样例

样例输入 1

3
1 100 50
10 10 100
9 80 56

样例输出 1

Case #1: Possible
Case #2: Broken
Case #3: Possible

数据范围与提示

Sample Explanation

In Case #3, I could have played games today () and games in total (), and won games today ( of ) and games in total ( of ).

Limits

  • ;
  • .

Small dataset (6 Pts, Test set 1 - Visible)

  • ;
  • .
  • Time limit: 30 3 seconds.

Large dataset (14 Pts, Test set 2 - Hidden)

  • ;
  • .
  • Time limit: 60 6 seconds.