Sample example. What we must find?

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?

"You should find the number of sets of K different numbers"

sets of K different numbers

Re: Sample example. What we must find?

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?

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*