6 kyu

Combination Lock

36 of 245bsylve
Description
Loading description...
Mathematics
  • Please sign in or sign up to leave a comment.
  • dfhwze Avatar

    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 ..

    • dfhwze Avatar

      added a note:

      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°.

  • joederek Avatar

    In my world the clock turns in the opposite diretion.

    • LetMeeDie Avatar

      bro , tell me how to change my avatar

    • ejini战神 Avatar

      @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

  • SagePtr Avatar
  • Quark Fox Avatar

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

  • Quark Fox Avatar

    the way i see it,

    0, 30, 0, 30 needs to move 210 units = 210 * 9 = 1890 degrees 0, 20, 0, 20 needs to move 180 units = 180 * 9 = 1620 degrees 0, 10, 0, 10 needs to move 150 units = 150 * 9 = 1350 degrees

    no clue what am i missing? Any suggestion? Anybody?

    • catchaser Avatar

      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.

    • Quark Fox Avatar

      Thank, you very much!

      Question marked resolved by Quark Fox 2 years ago
    • huyit88 Avatar

      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.

      https://www.art-of-lockpicking.com/wp-content/uploads/Open-a-Locker-Lock-Step-1.webp

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

    • joederek Avatar

      In my world the clock turns in the opposite diretion.

    • medAmineRg Avatar

      thanks i get it now

  • Awesome A.D. Avatar

    Following up on the question below: the description could use a line that clarifies that the numbers/markings are on the dial, not the casing. Perhaps simply asking the user to look closely at the provided image. Anything to clarify this, because I was stumped for a while until I read the discourse below.

  • anter69 Avatar

    Let's see the first example: 0, 30, 0, 30 -> 1350

    1. Turn the dial clockwise 2 full turns: 720
    2. Stop at the first number of the combination: 0 -> 30: 270
    3. Turn the dial counter-clockwise 1 full turn: 360
    4. Continue turning counter-clockwise until the 2nd number is reached: 30 -> 0: 270
    5. Turn the dial clockwise again until the 3rd number is reached: 0 -> 30: 270

    Total: 720 + 270 + 360 + 270 + 270 = 1890, not 1350

    What am I doing wrong?

  • uttumuttu Avatar
    1. Turn the dial clockwise 2 full turns
    2. Stop at the first number of the combination
    

    Please be more specific with these two steps. Do I always do two full clockwise turns (720 degrees) and then rotate some more to reach the first number (and if so, which direction should I turn to reach the first number -- clockwise, counterclockwise, or whichever is shorter)? Or do I first do a single clockwise turn (360 degrees) and then continue turning clockwise until I reach the first number?

  • Voile Avatar

    The example/sample tests are not very good, they only consist of the combination of 2 different distances and 3 different offsets. There might as well be only the first 3 example tests; there is no point in supplying several tests that test the same thing.

  • rowcased Avatar

    intial