## Timus Problem 1001 (Reverse Root) Solution

Timus Problem 1001(Reverse Root) : Reverse Root is a mathematical problem. To read details : http://acm.timus.ru/problem.aspx?space=1&num=1001 Proplem description: This is a straightforward problem.Just do square root. Problem Solution: #include <stdio.h> #include <math.h> int main() { double a[100],b[100]; int i,j,swap,n; scanf(“%d”,&n); for(i=0;i<n;i++){…

## Timus Problem 1005 (Stone pile) Solution

Timus Problem 1005 (Stone pile): This problem is for beginner in timus online judge. Problem details link : http://acm.timus.ru/problem.aspx?space=1&num=1005 Problem Description: just find the minimal difference among a value range. Usage Tips: >> Right shift operator : deletes the number of bits what…

## Timus Problem 1009(K-based Numbers) Solution

Problem details link: http://acm.timus.ru/problem.aspx?space=1&num=1009﻿ Problem Description: This is a straightforward problem check validity of K-based numbers. Problem Solution: #include <stdio.h> int main() { int m[1009],n,k; scanf(“%d %d”,&n,&k); m[1] = k-1; m[2] = k*(k-1); for (int i = 3; i <=n;…

## Timus Problem 1025 (Democracy in Danger) Solution

Timus problem 1025 Democracy in Danger : This problem is for beginner. Problem Details: http://acm.timus.ru/problem.aspx?space=1&num=1025 Problem Description: This is a Straightforward problem. Timus Problem 1025 Solution #include<stdio.h> int main() { int i,j,k,a,swap,n,sum=0,array[101]; scanf(“%d\n”,&n); for(i=0;i<n;i++) { scanf(“%d”,&array[i]); } for(i=0;i<n-1;i++) { for(j=0;j<n-i-1;j++)…

## Timus Problem 1064(Binary Search) Solution

Problem 1064 Binary Search details description : http://acm.timus.ru/problem.aspx?space=1&num=1064 Timus Problem 1064 Solution : #include <stdio.h> int main() { int n = 1; while(n <= 100) { printf(“%d\n”, n); n++; if(n > 10) { break; } n = 200; while(n <=…