From 30b61cd3d95baa4ca47f196fe6c3425a1bc78b78 Mon Sep 17 00:00:00 2001 From: ritwik1503 <35749253+ritwik1503@users.noreply.github.com> Date: Fri, 2 Oct 2020 05:01:16 +0530 Subject: [PATCH] Update 1_16priyesh.cpp --- Solutions/16priyesh/1_16priyesh.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Solutions/16priyesh/1_16priyesh.cpp b/Solutions/16priyesh/1_16priyesh.cpp index f74d868..cf06fa7 100644 --- a/Solutions/16priyesh/1_16priyesh.cpp +++ b/Solutions/16priyesh/1_16priyesh.cpp @@ -1,14 +1,18 @@ //coded by 16priyesh #include +#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; int main(){ + //To reduce the runtime + FAST; int t; cin>>t; while(t--){ int x,y,p; cin>>x>>y>>p; - if(p%2!=0) x*=2; + //Check odd bitwise. + if(p&1) x*=2; int result=(x>y)?(x/y):(y/x); cout<