Lazy-Active vs Strict
Practice
5 (1 votes)
Maths
Prime factorization
Sieve
Medium
Problem
79% Success 946 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Mike is a Lazy guy.He sleeps in lectures.Today the professor saw him sleeping. So he gave him an assignment.

As the prof. is a Strict guy ,he announced that he will deduct 10 marks if he fails to submit the assignment in the next lecture.

Given a number X ,He needs to find the probability that any divisor ( proper ) of X is a perfect square and a even number also.

NOTE :- Output of probability must be in N/D format ,where N and D are positive coprime numbers.

but if numerator is 0 then simply print 0.

Mike seeks for help from an Active guy who pays attention in the lecture.So now it's lazy and active vs Strict.

Can you help mike.

INPUT

  • First line of input contains an integer T denoting the test cases.
  • Following T lines, each line contains an integer X.

OUTPUT

  • output contains T lines . each line contains the answer in described format.

CONSTRAINTS

  • 1<=T<=40000
  • 1<=x<=1000000

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
3 votes
Tags:
Dynamic ProgrammingRecursionMediumMathematicsSieveApprovedFactorization
Points:30
14 votes
Tags:
Number TheoryInteger FactorizationMathAlgorithmsNumber theory
Points:30
Tags:
MathematicsMediumApprovedFactorization
Editorial

No editorial available for this problem.