Logo
(追記) (追記ここまで)

12504번 - FreeCell Statistics (Large) 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 512 MB124615454.000%

문제

I played D (D > 0) 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 Ggames in total (obviously, GD).

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 PD percent of the D games today, and exactly PG percent of Gtotal 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 (D), or the exact number of games that I have played in total (G). I do know that I could not have played more than N games today (DN).

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

입력

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

Limits

  • 0 ≤ PD ≤ 100;
  • 0 ≤ PG ≤ 100.
  • 1 ≤ T ≤ 2000;
  • 1 ≤ N ≤ 1015.

출력

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y 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

힌트

In Case #3, I could have played 5 games today (D = 5) and 25 games in total (G = 25), and won 4 games today (80% of 5) and 14 games in total (56% of 25).

출처

Contest > Google > Code Jam > Google Code Jam 2011 > Round 1A A2번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /