From f0017219a22715ba5a934e76e451397ebdbe0856 Mon Sep 17 00:00:00 2001 From: Yuvraj Singh <71546888+YuvrajSHAD@users.noreply.github.com> Date: Sun, 27 Feb 2022 15:24:18 +0530 Subject: [PATCH] Create ps-1_solution.py --- .../Solution/YuvrajSHAD_gameofcodes_ps-1/ps-1_solution.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Problem Statement-1/Solution/YuvrajSHAD_gameofcodes_ps-1/ps-1_solution.py diff --git a/Problem Statement-1/Solution/YuvrajSHAD_gameofcodes_ps-1/ps-1_solution.py b/Problem Statement-1/Solution/YuvrajSHAD_gameofcodes_ps-1/ps-1_solution.py new file mode 100644 index 0000000..3a36bf2 --- /dev/null +++ b/Problem Statement-1/Solution/YuvrajSHAD_gameofcodes_ps-1/ps-1_solution.py @@ -0,0 +1,8 @@ +import math +T = int(input()) +for i in range(T): + n, a, b, k = map(int,input().split()) + if ( n // a + n // b - n // ( a * b // math.gcd(a, b) ) *2 >= k ): + print( "Win" ) + else: + print( "Lose" )