2007-10-28から1日間の記事一覧

6. tennis

何も考えず実装。392byte。 p1 = p2 = 0 while(1): s = raw_input() if s == '1': p1 += 1 elif s == '2': p2 += 1 if p1 > p2: if p1 == 7: print 'Player1 wins the set %d - %d' % (p1, p2) break print 'Player1 leads %d - %d' % (p1, p2) elif p1 < p2…