RE02 - Editorial

Author: Arun Kumar
Tester: Divya Bajaj
Editorialist: Arun Kumar

CONTEST LINK:

https://www.codechef.com/RVEN2017

PROBLEM LINK:

https://www.codechef.com/RVEN2017/problems/RE02

DIFFICULTY:

SIMPLE

PROBLEM:

Finding the problem is the first task based on the input, output format and exe file provided. Then think the logic and code the same.

QUICK EXPLANATION:

The task in this problem is to print 10 terms of series starting with number input by user. Terms are determined by whether number is even or odd.

EXPLANATION:

After having number of test cases as input, each test is to be inputted and processed. Each test case contains a number (n). Next term of series(s) is determined by: s=n/2 if n is even, s=3*n+1 if n is odd.
You need to print first 10 terms of series.

AUTHOR’S SOLUTIONS:

Author’s solution can be found here

Exe File:

Exe file for the problem can be found here

//