# CodeChef Solution

## First and Last Digit Codechef Solution

If Give an integer N . Write a program to obtain the sum of the first and last digits of this number. Input The first line contains an integer T, the total number of test cases. Then follow T lines, each line contains an integer N. Output For each test case, display the sum of first and last digits of N in a …

## Turbo Sort Codechef Solution

Given the list of numbers, you are to sort them in non decreasing order. Input t – the number of numbers in list, then t lines follow [t <= 10^6]. Each line contains one integer: N [0 <= N <= 10^6] Output Output given numbers in non decreasing order. Example Input: 5 5 3 6 …

## Small Factorials Codechef Solution

You are asked to calculate factorials of some small positive integers. Input An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100. Output For each integer n given at input, display a line with the value of n! Example Sample Input 4 1 2 5 …

## Sum of Digits Test Codechef Solution

You’re given an integer N. Write a program to calculate the sum of all the digits of N. Input The first line contains an integer T, the total number of testcases. Then follow T lines, each line contains an integer N. Output  For each test case, calculate the sum of digits of N, and display it in a new line. Constraints 1 …

## Enormous Input Test Codechef Solution

The purpose of this problem is to verify whether the method you are using to read input data is sufficiently fast to handle problems branded with the enormous Input/Output warning. You are expected to be able to process at least 2.5MB of input data per second at runtime. Input The input begins with two positive …

## Find Remainder Codechef Solution

Write a program to find the remainder when an integer A is divided by an integer B. Input The first line contains an integer T, the total number of test cases. Then T lines follow, each line contains two Integers A and B. Output For each test case, find the remainder when A is divided …