You are viewing a single comment's thread. Return to all comments →
Go pgm
func howManyGames(p int32, d int32, m int32, s int32) int32 { var result int32 = 0 var sum int32 =0;
for { sum = sum +p if sum<=s{ result++ if (p-d) >=m{ p = p-d }else{ p=m } }else{ break; } } return result
}
Seems like cookies are disabled on this browser, please enable them to open this website
Halloween Sale
You are viewing a single comment's thread. Return to all comments →
Go pgm
func howManyGames(p int32, d int32, m int32, s int32) int32 { var result int32 = 0 var sum int32 =0;
}