Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 3 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 9.00

people of Byteland

Far far away from here ,there is a world of peace ,Byteland .But this morning ,Laskar-e-trishul ,a terrorist Organisation has
threatened the people of Byteland declaring that the peaceful land will be bombarded today.The Intelligence of Byteland has intercepted
an encrypted key which is claimed as the key of Bomb.


Programmers were called to Decrypt the key but they were stuck at a problem.

 

It is required to first evaluate f(A,B) and then key is equal to the no. of pairs (L,M) where

1 such that gcd of L and M is C.
Now Mayer of Byteland is looking for you as his last option.
Note:A^B means A raise to the power B
f(A,B)=K(A^B)
where

K(x)
{
s=0
while(x)
{
s=s+x%10;
x=x/10;
}
if(s>9)
s=K(s);
return s;
}

Input:


First Line contains T=No. of test Cases
For each test Case:
Each Line consists of four integers A, B , C, P corresponding to each test case.

Output:

For each test case, output the number of desired pairs of (L,M).

Constraints:

1
11

INPUT

1
2 2 2 6

OUTPUT

10

Answers

(5)
Status NEW Posted 16 Sep 2017 01:09 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)