ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1091. Tmutarakan Exams

Sample example. What we must find?
Posted by IgorKoval(from Pskov) 11 Dec 2011 19:35
How get answer 11 for K==3 and S==10
I understand it so:

a b gcd(a,b)
2 4 2
2 6 2
2 8 2
2 10 2
3 6 3
3 9 3
4 2 2
4 6 2
4 8 4
4 10 2
5 10 5
6 2 2
6 3 3
6 4 2
6 8 2
6 9 3
6 10 2
8 2 2
8 4 4
8 6 2
8 10 2
9 3 3
9 6 3
10 2 2
10 4 2
10 5 5
10 6 2
10 8 2
So, cnt = 28 //count of pair a, b

And my answer is 28. Why am wrong? And how use 'K'? =)



Edited by author 11.12.2011 19:36
Re: Sample example. What we must find?
Posted by Artyom Averin{USU} 13 Dec 2011 17:26
"You should find the number of sets of K different numbers"
sets of K different numbers
Re: Sample example. What we must find?
Posted by IgorKoval(from Pskov) 13 Dec 2011 21:04
Please, give some example of "sets of K different numbers"( there are 11 sets(from Sample example) ) for K==3 and S==10.
Thank you.

Edited by author 13.12.2011 21:07

Edited by author 13.12.2011 21:07
Re: Sample example. What we must find?
Posted by IgorKoval(from Pskov) 13 Dec 2011 21:28
a b  c fgcd(c,fgcd(a,b))
2 4  6 2
2 4  8 2
2 4 10 2
2 6  8 2
2 6 10 2
2 8 10 2
3 6  9 3
4 6  8 2
4 6 10 2
4 8 10 2
6 8 10 2
cnt = 11


fgcd - function which return greatest common divisor


Edited by Trolol 13.12.2011 21:30

Edited by author 13.12.2011 21:50