Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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 XX km away from his home.
If his office is open on 55 days in a week, find the number of kilometers Chef travels through office trips in a week.
For each test case, output the number of kilometers Chef travels through office trips in a week.
Input:
4
1
3
7
10
Output:
10
30
70
100
Test case 1: The office is 11 km away. Thus, to go to the office and come back home, Chef has to walk 22 kms in a day. In a week with 55 working days, Chef has to travel 2\cdot 5 = 102⋅5=10 kms in total.
Test case 2: The office is 33 kms away. Thus, to go to the office and come back home, Chef has to walk 66 kms in a day. In a week with 55 working days, Chef has to travel 6\cdot 5 = 306⋅5=30 kms in total.
Test case 3: The office is 77 kms away. Thus, to go to the office and come back home, Chef has to walk 1414 kms in a day. In a week with 55 working days, Chef has to travel 14\cdot 5 = 7014⋅5=70 kms in total.
Test case 4: The office is 1010 kms away. Thus, to go to the office and come back home, Chef has to walk 2020 kms in a day. In a week with 55 working days, Chef has to travel 20\cdot 5 = 10020⋅5=100 kms in total.
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i=1;i<=t ;i++ ){
int x = sc.nextInt();
System.out.println((2*x)*5);
}
}
}
#include <iostream>
using namespace std;
int main() {
long long t;
cin>>t;
while(t--)
{
long long n;
cin>>n;
cout<<(n*10)<<"\n";
}
return 0;
}
T = int(input())
for _ in range(T):
km = int(input())
print(km*2*5)
In our experience, we suggest you solve this Fitness CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Fitness CodeChef Solution
I hope this Fitness CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>