100% Guaranteed Results


Project
$ 29.99
Category:

Description

5/5 – (1 vote)

This problem is a programming version of Problem 40 from projecteuler.net
An irrational decimal fraction is created by concatenating the positive integers:
0.12345678910 extbf{ 1 }112131415161718192021 cdots
It can be seen that the 12^{th} digit of the fractional part is 1.
If d_n represents the n^{th} digit of the fractional part, find the value of the following expression. d_{i_1} imes d_{i_2} imes d_{i_3} imes d_{i_4} imes d_{i_5} imes d_{i_6} imes d_{i_7}
Input Format
First line contains T that denotes the number of test cases. This is followed by T lines, each containing an 7 integers.
i_1 i_2 i_3 i_4 i_5 i_6 i_7
Output Format
Print the answer corresponding to the test case.
Constraints
1 le T le 10^{5}
1 le i_1,i_2,i_3,i_4,i_5,i_6,i_7 le 10^{18}
Sample Input

Sample Output

Loading web-font TeX/Main/Bold

Reviews

There are no reviews yet.

Be the first to review “Project”

Your email address will not be published. Required fields are marked *

Related products