Problem Description Link
Algorithm:
This is a simple problem you can follow this technique.
Let t is test case n is the number of input each test case
and a, b, c are input for n times.
where a=size of land in square feet
b= no of animals
c= environment-friendliness tools per square feet
you need to calculate total number of tools for all land
1. input for testcase
2. loop 1 to testcase
get input for n
loop 1 to n
get input for a , b, c
sum+=(a*c);
print the sum;
3.end
Algorithm:
This is a simple problem you can follow this technique.
Let t is test case n is the number of input each test case
and a, b, c are input for n times.
where a=size of land in square feet
b= no of animals
c= environment-friendliness tools per square feet
you need to calculate total number of tools for all land
1. input for testcase
2. loop 1 to testcase
get input for n
loop 1 to n
get input for a , b, c
sum+=(a*c);
print the sum;
3.end
No comments:
Post a Comment
Write your comment - Share Knowledge and Experience