"1e+1.1"->true, "1e1.1"->false


  • 1
    A

    I wound think after 'e' we should expect an integer, but looks like OJ would pass if a non integer with a sign follows e

    Is this a bug? Or I'm missing something?

    Some examples

    "1e+1.1"->true

    "1e1.1"->false

    "1e-1.1"->true

    "1e-11"->true

    "1e11"->true

    "1e+11"->true

    update: OJ should have a bug..
    my accepted code returns true for "1e+1e1"


  • 1
    S

    my AC code return false for "1e+1.1" and "1e-1.1"


  • 0
    T

    me too.
    my code accpets 1e+1, 1e-1 and 1e1, but not for 1e+-1 or 1e1.1.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.