SPOJ Solution

NSTEPS – Number Steps Solution

0
NSTEPS Statement Starting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,... as shown in the figure. For example,...
SPOJ Solution

NFACTOR – N-Factorful Slution

0
NFACTOR Statement A number is called n-factorful if it has exactly n distinct prime factors. Given positive integers a, b, and n, your task is to find the number of integers...
SPOJ Solution

MULTQ3 – Multiples of 3 Solution

0
MULTQ3 Statement There are N numbers a,a..a. Initally all are 0. You have to perform two types of operations : 1) Increase the numbers between indices...
SPOJ Solution

MCOINS – Coins Game Solution

0
MCOINS Statement English Vietnamese Asen and Boyan are playing the following game. They choose two different positive integers K and L, and start the game with a...
SPOJ Solution

MAIN72 – Subset sum Solution

0
MAIN72 Statement You are given an array of N integers. Now you want to find the sum of all those integers which can be expressed...