about summary refs log tree commit diff
path: root/codechef/hmappy2.p6
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-02-13 20:48:02 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-02-13 20:48:28 +0700
commit477c426b55d168764a34873561f78b3c34b1f013 (patch)
tree30d0982d9b501b6c1a45ac73d9cc90bcbc750407 /codechef/hmappy2.p6
parentce56bd193a7c8c6437443227cd3abb51134e3e7a (diff)
downloadcp-477c426b55d168764a34873561f78b3c34b1f013.tar.gz
A new project is coming
Diffstat (limited to 'codechef/hmappy2.p6')
-rwxr-xr-xcodechef/hmappy2.p65
1 files changed, 5 insertions, 0 deletions
diff --git a/codechef/hmappy2.p6 b/codechef/hmappy2.p6
new file mode 100755
index 0000000..cfe4cf5
--- /dev/null
+++ b/codechef/hmappy2.p6
@@ -0,0 +1,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';
+}