Number theory SPOJ APS - Amazing Prime Sequence - SPOJ Solution C++ May 11, 2021 Add Comment ➤ Problem Link : APS 👉 Hint : Precompute smallest prime factors for all numbers ✅ C++ Solution : #include<bits/stdc++.h> usin... Read More
Number theory SPOJ ZSUM - Just Add It - SPOJ Solution C++ May 09, 2021 Add Comment ➤ Problem Link : ZSUM 👉 Hint : Find (a pow b) % m ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; long long int... Read More
Combinatorics Number theory SPOJ GOODB - Good Predictions - SPOJ Solution C++ May 09, 2021 Add Comment ➤ Problem Link : GOODB 👉 Hint : Number theory with combinations ✅ C++ Solution : #include<bits/stdc++.h> using namespace std;... Read More
Number theory SPOJ DIV - Divisors - SPOJ Solution C++ May 04, 2021 Add Comment ➤ Problem Link : DIV 👉 Hint : Use Sieve method to find smallest prime factor ✅ C++ Solution : #include<bits/stdc++.h> using n... Read More
Binary Search Math Number theory SPOJ FRQPRIME - Frequent Prime Ranges - SPOJ Solution C++ April 26, 2021 Add Comment ➤ Problem Link : FRQPRIME 👉 Hint : edit please ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; int sieve[10000... Read More
Math Number theory SPOJ AMR11E - Distinct Primes - SPOJ Solution C++ April 25, 2021 Add Comment ➤ Problem Link : AMR11E 👉 Hint : edit please ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; int pr[100000]; s... Read More
Number theory SPOJ PRIME1 - Prime Generator - SPOJ Solution C++ April 23, 2021 Add Comment ➤ Problem Link : PRIME1 👉 Hint : edit please ✅ C++ Solution : #include <bits/stdc++.h> using namespace std; #define MAX 10000... Read More
Number theory SPOJ CUBEFR - Cube Free Numbers - SPOJ Solution C++ April 18, 2021 Add Comment ➤ Problem Link : CUBEFR 👉 Hint : edit please ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; bool arr[1000001];... Read More
Math Number theory SPOJ CRDS - Cards - SPOJ Solution C++ April 13, 2021 Add Comment ➤ Problem Link : CRDS 👉 Hint : edit please ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; long long int m=1000... Read More