Fitness

Tags : codechef, math, cpp, easy

Chef wants to become fit for which he decided to walk to the office and return home by walking. It is known that Chef’s office is X km away from his home.

If his office is open on 5 days in a week, find the number of kilometers Chef travels through office trips in a week.

Input Format:

Output Format:

For each test case, output the number of kilometers Chef travels through office trips in a week.

Examples #

Example 1:

Input :
4
1
3
7
10

Output :
10
30
70
100

Explanation :
Test Case 1: he office is 1 km away. Thus, to go to the office and come back home, Chef has to walk 2 kms in a day. In a week with 5 working days, Chef has to travel 2*5=10 kms in total.

Test Case 2: he office is 3 km away. Thus, to go to the office and come back home, Chef has to walk 6 kms in a day. In a week with 5 working days, Chef has to travel 6*5=30 kms in total.

Test Case 3: he office is 7 km away. Thus, to go to the office and come back home, Chef has to walk 14 kms in a day. In a week with 5 working days, Chef has to travel 14*5=70 kms in total.

Test Case 4: he office is 10 km away. Thus, to go to the office and come back home, Chef has to walk 20 kms in a day. In a week with 5 working days, Chef has to travel 20*5=100 kms in total.

Constraints #

Solutions #

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
int MOD = 1e9+7;

int solution(int x) {
    return 10*x;
}

int main() {
	// your code goes here
	int T; cin >> T;
	int x;
	while(T--) {
	    cin >> x;
	    auto p = solution(x);
	    cout << p << endl;
	}
	return 0;
}