DMOPC '19 Contest 4 P0 - Yikes

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Larry is having trouble making a problem for the DMOPC, and [REDACTED] is threatening to savage him, so he decides that he will make a nice string manipulation problem.

Given string A, determine if it is possible to make string B by changing exactly one character of string A to a different character. Both strings are of the same length, and will only consist of alphanumeric characters.

Input Specification

The first line of input will be string A (1 \leq |A| \leq 1000).

The next line of input will be string B (|A| = |B|).

Output Specification

LARRY IS SAVED! if it is possible to make string B from string A, given the restrictions.

LARRY IS DEAD! if it is not possible, given the restrictions.

Sample Input

abc
abd

Sample Output

LARRY IS SAVED!

Comments


  • -2
    jfuN  commented on Feb. 15, 2020, 4:35 p.m.

    why is test case 21 not working :(


    • 0
      aydin  commented on March 21, 2020, 4:25 p.m.

      Given string A, determine if it is possible to make string B by changing exactly one character of string A to a different character.

      Changing exactly one character, no more, no less.


  • -1
    c  commented on Jan. 9, 2020, 12:18 a.m.

    The superiority of JavaScript has been proven.

    enter image description here


    • 10
      hewmatt10  commented on Jan. 11, 2020, 2:42 p.m.

      look up