Ad
  • Custom User Avatar
    • typo :

      colo(u)rs -> colors

    • Initial code section :
      `/workspace/node/test.js:6`
      `/*The structure of the flag objects in full_flag_list:`
       `SyntaxError: Invalid or unexpected token`  
      
  • Custom User Avatar

    Task

    Emulate a back ATM Machine and its features with a class.

    Requirements

    Default Settings: new ATM(usersArr) where usersArr is an array of users {username: username, password: password, money: money}

    >> atm = new ATM(users<arr)

    The class will also have the following methods :

    • Register : atm.register(username, password)

      This adds a new user to database with 0$ money, return 0 when done, return 1 when user already exists.

    • Login : atm.login(username, password)

      login a user to do action next, return 0 when done, return 1 when wrong username or wrong password are given

    • Logout : atm.logout():

      logout current user, return 0 when done, return 1 when user already logged out

    • Query Stat : ATM.query()

      query account status, return {money: money} when done, return 1 when user already logged out

    • Change Password : ATM.changePass(oldPass, newPass)

      change password, return 0 when done, return 1 when logged out, return 2 when wrong old password is given

    • Payment : ATM.pay(count, target)

      Payment to another user registered, return new money when done, return 1 when already logged out, return 2 when no enough money, return 3 when target user not exist

    Good luck :-P

  • Custom User Avatar

    Is the bathhouse gender fluid ? ;)

  • Custom User Avatar

    Typo in the description (3 times):

    occurence

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Second and third sample tests seem to be wrong :

    • [(-2, 5), (4, -1), (4, 11), (10, 5)]

      For n = 10: [4, (4, 11)] should equal [4, (4, -1)]

    • [(260, 120), (264, 92), (264, 148), (280, 60), (280, 180), (300, 40), (300, 200), (332, 24), (332, 216), (360, 20), (360, 220), (388, 24), (388, 216), (420, 40), (420, 200), (440, 60), (440, 180), (456, 92), (456, 148), (460, 120)]

      For n = 100: [20, (420, 40)] should equal [20, (420, 200)]

    • There are many ways to sort an array, you have to be explicit.

    • Use katex for math formulas :

      (x – h)^2 + (y – k)^2 = r^2
      
    • Description has be rewritten to correspond to actual quality standards.

    • In light mode, your example is hard to see.

  • Custom User Avatar

    This one is crazily cool and rewarding. It should be translated to Python by a someone.

  • Custom User Avatar

    ReferenceError: MYSUPERENCRIPT is not defined

    encrypt, decrypt

  • Custom User Avatar
    f(n) =  \begin{cases} \frac{n}{2} \quad &\text{if }& n \equiv 0 \pmod{2}\\ 3n + 1 \quad &\text{if }& n \equiv 1 \pmod{2} \end{cases} 
    
  • Custom User Avatar

    I tried to reduce my code for days, not understanding why my formula was wrong!

  • Custom User Avatar

    In the sample tests tester("11000", "01111", 4, 1):

    Remove components 1 and 2, price of 1, quality of 4

    Isn't it :

    Remove component 1, price of 1, quality of 4

    To prevent bad understanding, maybe add in the description that indices are 1-based in your sample tests.

  • Custom User Avatar

    Cool, but the output should be a string.

  • Custom User Avatar

    expected false to be true

    Is not a very useful message!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...