From b0819032827e537046f722ca3429277c7e01abec Mon Sep 17 00:00:00 2001 From: Pranav0-0Aggarwal <96537779+Pranav0-0Aggarwal@users.noreply.github.com> Date: Wed, 19 Oct 2022 22:58:30 +0530 Subject: [PATCH] Create Codechef_Xormul_Shortest_Sol.cpp --- .../Codechef_Xormul_Shortest_Sol.cpp | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Hacktoberfest2022/Codechef_Xormul_Shortest_Sol.cpp diff --git a/Hacktoberfest2022/Codechef_Xormul_Shortest_Sol.cpp b/Hacktoberfest2022/Codechef_Xormul_Shortest_Sol.cpp new file mode 100644 index 0000000..db9daa7 --- /dev/null +++ b/Hacktoberfest2022/Codechef_Xormul_Shortest_Sol.cpp @@ -0,0 +1,33 @@ +//Shortest Solution to codechef question XORMUL, LINK- "https://www.codechef.com/problems/XORMUL?tab=statement" + + +#include +using namespace std; + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + int T; + cin >> T; + while(T--){ + int n,a,b; + cin >> n >> a >> b; + int c=0; + bool ok=true; + for(int i=n-1;i>=0;i--){ + if(((1<