CPP program to find max ( X , Y ) / min ( X , Y ) after P turns
#include <bits/stdc++.h> NEW_LINE using namespace std ; int findValue ( int X , int Y , int P ) { if ( P % 2 == 0 ) return ( max ( X , Y ) / min ( X , Y ) ) ; else return ( max ( 2 * X , Y ) / min ( 2 * X , Y ) ) ; }