Codeforces Global Round 6
A. Competitive Programmer
According to the problem statement you are given some digits ( 0 - 9 ) , is it possible to make a number using all digits which is divisible by 60 ?
To make a number from the digits which is divisible by 60, we need a zero and more than one even digits and digits sum must be divisible by 3.
Code :
B. Dice Tower
According to the the picture given in the problem the sum of any two oppsite side of the dice is 7. Accept top dice , sum of all visible side pips in a dice is 21 - 7 = 14.
We can make a tower , which all visible pips is equal to n , if
n = 14 * d + 14 + pip
n = 14 * D + pip
where pip = { 1, 2, 3, 4, 5, 6 }
Code :
A. Competitive Programmer
According to the problem statement you are given some digits ( 0 - 9 ) , is it possible to make a number using all digits which is divisible by 60 ?
To make a number from the digits which is divisible by 60, we need a zero and more than one even digits and digits sum must be divisible by 3.
Code :
B. Dice Tower
According to the the picture given in the problem the sum of any two oppsite side of the dice is 7. Accept top dice , sum of all visible side pips in a dice is 21 - 7 = 14.
We can make a tower , which all visible pips is equal to n , if
n = 14 * d + 14 + pip
n = 14 * D + pip
where pip = { 1, 2, 3, 4, 5, 6 }
Code :
Comments
Post a Comment