Prime Sum Hackerrank C++ Solution

Below is the solution for Prime sum question on Hackerank. #include<bits/stdc++.h> using namespace std; #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define mygc(c) (c)=getchar_unlocked() #define mypc(c) putchar_unlocked(c) #define ll long long #define ull unsigned ll void reader(int *x){int k,m=0;*x=0;for(;;){mygc(k);if(k==’-‘){m=1;break;}if(‘0′<=k&&k<=’9’){*x=k-‘0’;break;}}for(;;){mygc(k);if(k<‘0’||k>’9’)break;*x=(*x)*10+k-‘0′;}if(m)(*x)=-(*x);} void reader(ll *x){int k,m=0;*x=0;for(;;){mygc(k);if(k==’-‘){m=1;break;}if(‘0′<=k&&k<=’9’){*x=k-‘0’;break;}}for(;;){mygc(k);if(k<‘0’||k>’9’)break;*x=(*x)*10+k-‘0′;}if(m)(*x)=-(*x);} void writer(const char c[]){int i;for(i=0;c[i]!=’\0’;i++)mypc(c[i]);} /* 64?2????leading zero??? */ int ullNumberOfLeadingZerosTable[256]={8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int ullNumberOfLeadingZeros(ull … Read more

Akshay Saini Biography: Net Worth, Wife and Courses

akshay saini biography

Akshay Saini is an Indian YouTuber and educator who has previously worked as a front-end engineer at Uber, Paytm, and Lendingkart. He is famous for his course named Namaste Javascript on Youtube and for writing engaging posts on javascript with the Simran story. Every javascript lover loves him so much in the javascript community. currently, … Read more

Version Control System – Git Tutorial

version control system

Version Control System: A version control system is defined as a management software responsible for managing changes to computer programs, documents, large websites, or other collections of information. Have you ever wondered how lakhs of developers collaborate on the same project from any part of the world by working remotely? If yes, then you are … Read more

Kunal Kushwaha | Dsa, open source and his biography

Kunal Kushwaha is a YouTuber, DevRel’s manager at Civo and the founder of WeMakeDevs formerly known as the community classroom. He is an engineering graduate of 2018-22 from Maharaja Agrasen institute of technology in computer science. Currently, he has gained a lot of fame by creating awesome content on Dsa, DevOps and more. Currently, he … Read more

Tokens in C language

Tokens in c are the basic building blocks in C language. We can also define a token in c as the smallest individual unit in a program through which a program is structured. The meaning of tokens is already predefined by the C compiler. Therefore it is not possible to create a program without using … Read more

AKU Patna ECE Previous year question papers download

Download the AKU Patna ECE Previous year’s question papers of all year in one click. Semester 1 Subject Click Here Problem-solving through programming in C(PPS) Download Workshop and manufacturing process(WMP) Download Engineering Chemistry Download English Download Math 1 Download Semester 2 Subject Click Here Basic electrical engineering(BEE) Download Engineering graphics & design(EGD) Download Engineering Physics … Read more

How to apply Coursera courses for free

In this post, you will know how to apply for any Coursera courses for free with a certificate of completion. so please read this post and start learning for free with Coursera. So first of all, you have to go to the official website Coursera and then search for the course that you want to learn.   after choosing the … Read more

Difference between absolute and relative position in CSS

As we know, we can use CSS to design our website. so in the website, there are multiple layers and containers through which we create the structure of any website. so for stylish layouts, we need to position the layers, containers, elements etc. for a great user experience on our website. for that, we use the CSS Position property … Read more

Who is Love Babbar | Biography, girlfriend, money and education

who is love babbar

Love Babbar is the Founder of CodeHelp and a former Software Engineer at Amazon and Microsoft. He graduated from Netaji Subhash Institute of technology with an information technology stream in bachelor’s of engineering. He is famous for his coding tutorial on youtube and controversies various times on Linkedin and Youtube. Also, he is the batchmate … Read more