Projecteuler -- 21 (Amicable numbers)

Solution :  If you don't understand the solution process I will recommend you to go my blog's algorithm section and search "Divisor কথন" and read it hope you will understand. problem Description : Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ≠ b,...

URI -- 1323 (Feynman)

Solution :  Formula for n*n Grid's square sum :{ n*(n+1)*(2n+1) }/6  Formula for n*m Grid's Rectangle sum : { n*(n+1) /2 }^2 This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...

Hackerearth -- In love with primes

solution :  Note: Goldbach's conjecture is states that every even number is a sum of two odd prime number no need to check its proof just use the method. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that...

Project Euler -- 48 (Self powers)

Problem : The series, 11 + 22 + 33 + ... + 1010 = 10405071317. Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. My solution approach is, first made a smaller version of the problem then I tried to solve it after solving this I was going to solve the bigger version. // a. find out p=2^15 // b. print the last digit of p ...

উইলসন থিওরেম

প্রাইম নাম্বার বের করার জন্য সিভের অ্যালগরিদম প্রায় সবাই জানে, অনেকের অ্যালগোরিদম শেখার শুরুটাও এই সিভ দিয়ে আমার নিজের তাই। যাই হোক প্রাইম নাম্বার চেক করার জন্য আর একটি সহজ থিওরি হচ্ছে এই উইসন থিওরেম। উইলসন থিওরেমকে এভাবে বলা যায়, একটি natural number  n( n>1 )প্রাইম হবে যদি (( n-1)!) mod...

Exception Handling in Java

The exception handling in java is one of the powerful mechanism to handle the runtime errors so that normal flow of the application can be maintained. Definition : An Exception represent an error condition that can occur during the normal course of program execution. When an...