• ###### medAmineRgcommented on "Combination Lock" kata

thanks i get it now

• ###### dfhwzecommented on "Combination Lock" kata

Note that we're looking for the total degrees of rotation, regardless of the direction of rotation. For instance, if you rotated 720° clockwise and 360° counter-clockwise, the total is 1080°.

done

approved

• ###### dfhwzecommented on "Combination Lock" kata

how many degrees is the dial rotated in total (clockwise plus counter-clockwise) in opening the lock?

I was taking the difference between rotating right and rotating left, but we are expected to ignore direction, and just some all of it together. I suppose noone else misread the description like I did ..

• ###### ejini战神commented on "Combination Lock" kata

@IMMERSION_ The only way you can change avatars is by linking your profile to Github account (As of now). Such feature might be implemented in the future and is already within backlog

• ###### 1000-7??commented on "Combination Lock" kata

bro , tell me how to change my avatar

• ###### joederekcommented on "Combination Lock" kata

You not wrong, the clock's direction is wrong!

• ###### joederekcommented on "Combination Lock" kata

In my world the clock turns in the opposite diretion.

• ###### joederekcommented on "Combination Lock" kata

In my world the clock turns in the opposite diretion.

• ###### huyit88commented on "Combination Lock" kata

Sorry, i still don't get it. Why rotating the dial clockwise (instruction step#2) from zero to 30 will take 90 degrees;

I am not sure what is the way to calculate the degree.

I just think the formula should be:

With clockwise start from 0:

0 -> 10 : 90 degree

0 -> 20: 180 degree

0 -> 30: 270 degree

With counter-clockwise start from 0:

0 -> 30: 90 degree

0 -> 20: 180 degree

0 -> 10: 270 degree

Can any one explain what's wrong with my formula?

------UPDATE------

After researching for a while, i realize my assumption is wrong.

The formula should be opposited base on the picture.

It help me visual the problem easily more than the image in task.

• ###### Quark Foxcommented on "Combination Lock" kata

Cool kata, but cool head is important for a cool finish!!

• ###### Quark Foxresolved a question on "Combination Lock" kata

Thank, you very much!

• ###### catchasercommented on "Combination Lock" kata

Hi, Quark Fox!

Have a look at the example (0, 30, 0, 30) once again:

1. rotating the dial clockwise (instruction step#2) from zero to 30 will take 90 degrees;
2. rotating the dial counter-clockwise (instruction step#4) from 30 to zero will take another 90 degrees;
3. then again, rotating the dial clockwise (instruction step#5) from zero to 30 will take 90 degrees;

According to the instruction steps(#1, #3) you have a value of 360 times 2(#1) + 360(#3), which is 1080.
Now add this to 90*3 and you get 1350.

Hope that helps.