about summary refs log tree commit diff
path: root/codechef/hmappy2.p6
blob: cfe4cf5f99d50d906cdda234bfbffea533d9ba2c (plain) (blame)
1
2
3
4
5
#!/usr/bin/env perl6
for ^get() {
    my ($N, $A, $B, $K) = get.words.map: *.Int;
    put $N div $A + $N div $B - $N div ($A lcm $B) * 2 < $K ?? 'Lose' !! 'Win';
}