Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Kumited a Java translation!
This code is FAR from unreadable.... I really don't understand the difficulty here. The only thing that might be hard to understand for someone who's even remotely new to coding in Java (or in general) is the ternary operator. Even that can be easily understand with a quick google search.
No, read the posts below before creating a new issue about the same.
This comment is hidden because it contains spoiler information about the solution
Nvm, I asked some friends and I understand perfectly now. Thank you for the help though, @dinglemouse
Oh, I understand what the code is doing, it's the math itself I don't think I'm fully grasping. Like why is he multiplying the weights by 3?
Explanation:
(the counter
n
is 1-based to make it easier to read)n[1]/3*1000
Note: all these are int arithmeticn[6]/3*600
n[5]/3*500
n[4]/3*400
n[3]/3*300
n[2]/3*200
n[1]%3*100
use mod to catch the remainder 1's not worth 1000 pointsn[5]%3*50
use mod to catch the remainder 5's not worth 500 pointsGod I need to strengthen my math skills. This never even crossed my mind x_x
edit: If anyone sees this comment and understands the code above, could you explain it please. I'm actually having some trouble understanding the math behind it.