summaryrefslogtreecommitdiff
path: root/2011/1b/a/a.py
blob: 806eb9535c0c1ed854923e4dbd86a15ff75613f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
f = open('1.in', 'r')
o = open('1.out', 'w')

T = int(f.readline().strip())

for t in xrange(T):
    (N, PD, PG) = map(int, f.readline().strip().split(' '))
    
    wt = (N * PD)
    wy = (N * PG)
    
    print (wt, wy)
    
    res = 'Possible' if PD >= PG else 'Broken'
    s = "Case #%d: %s\n" % (t+1, res)
    print s
    o.write(s)