Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Task. PROGRESSION the task must be solved in python [closed]

$
0
0

the task must be solved in pythonInput file name: standard inputOutput file name: stdoutTime limit: 0.5 secondsMemory limit: 256 megabytesGiven six natural numbers A1, B1, A2, B2, A3, B3, denoting three fractions (A1/ B1, A2/B2, A3/ B3).If these fractions are the beginning of an (infinite) geometric progression, then: if there isthe sum of all terms of this progression, then output the sum in the form of the (smallest possible) numeratorand the denominator of the fraction, otherwise output 2 2. Otherwise, output 3 3.Input formatSix natural numbers from 1..2022, separated by single spaces.Output formatTwo natural numbers separated by a space.Rating systemIn one of the tests there will be A1 = A2 = A3 = 1.In one of the tests there will be B1 = B2 = B3 = 1.Example: the numbers 4,3,400,900,4,27 are entered then it should output 2 1. the second example: the numbers 7,700,1,100,20,2000 are entered then it should output 2 2. and the last example is entered 4,3,4,27,400,900 should output 3 3

I tried this code and nothing worked for me although I don’t see an error


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>