Exploring Linear Diophantine Equation

This is a well-known method to solve linear equations with 2 or more variables. The specialty of this method is that it provides integer solutions to the linear equation of…

Continue Reading Exploring Linear Diophantine Equation

SUMPRO – SUM OF PRODUCT

Problem Link - https://www.spoj.com/problems/SUMPRO/ Problem Statement : Given a number N, find the sum of all products x*y such that N/x = y (Integer Division).Since, the sum can be very large, please output this modulo 1000000007.…

Continue Reading SUMPRO – SUM OF PRODUCT

CF #598 C. Nearest vectors

Using atan2() vs atan() Problem Statement : https://codeforces.com/contest/598/problem/C The entire problem is based on the fact of using long doubles instead of doubles for calculating angles. You must try yourself…

Continue Reading CF #598 C. Nearest vectors

D – Sum of Large Numbers

Problem Statement : here The tricky part is the addition of 10^100. So, let us assume that we are using k numbers to generate our sum. Clearly, in this case, the…

Continue Reading D – Sum of Large Numbers