Forget Me Not

View as PDF

Submit solution

Points: 4
Time limit: 2.0s
Memory limit: 256M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

The black foxen are the arch enemies of Tushan: they corrupt the love of reincarnated soulmates by absorbing their memories. This allows the black foxen to steal their pledge of love and the resulting spirit power.

The black foxen would like to prioritize a victim's memories, starting with the most important one. They have converted each memory to an integer, with up to 1 million digits (this will not fit in int data type). For this problem, the black foxen have hired you to compare two memories and print the one which is higher.

Given 2 non-negative integers S and T on different lines, where both S and T are less than 10^{100\,000}. The number may contain leading zeros. If S is larger than T output S, if T is larger than S output T otherwise, output E.

Sample Input


Sample Output



  • -3
    showme  commented on Sept. 17, 2020, 11:00 p.m.

    Umm... Why is it that it says that I will get 4 points but I only got 2?

  • -1
    HS  commented on Oct. 19, 2018, 11:10 p.m. edited

    How do you convert S and T into an integer?

    Is there a command that inputs integers with up to 1 million digits?


  • -5
    GD_FrostByte  commented on Sept. 25, 2018, 3:55 p.m. edit 4

    This comment is hidden due to too much negative feedback. Click here to view it.

    • 11
      aeternalis1  commented on Sept. 25, 2018, 4:22 p.m. edited

      The constraints on this problem state the numbers in the input can be up to a hundred thousand digits long. Find a different way to store them, because they will certainly not fit in an int, long or float. Or a double, which I see you attempted to use after I commented.

      • 3
        HS  commented on Oct. 19, 2018, 11:23 p.m.

        I'm using python 3 and my code worked by inputing an integer normally with int(input()). It seems that the test cases do fit in an int.

        Am i wrong?

        • 4
          kingW3  commented on Oct. 20, 2018, 5:06 a.m.

          Python int is a big int, in most languages though this isn't the case (c++, c, java, etc.)

  • -3
    GD_FrostByte  commented on Sept. 23, 2018, 6:01 p.m.

    y am i getting IRs

    • 5
      Relativity  commented on Sept. 23, 2018, 7:45 p.m.

      The number can be bigger than an int or a long