Nathan Coulas

DMOPC '19 Contest 4 P0 - Yikes

dmopc19c4p0 CPP11 12 May, 2020 0.248s 3 points

Source Code

#include <bits/stdc++.h>
using namespace std;
string a, b;
int c;

int main(){
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> a >> b;
	for(int i = 0; i < a.length(); i++){
		if(a[i] != b[i]){
			c++;
			if(c == 2) break;
		}
	}

	if(c == 1){
	    printf("LARRY IS SAVED!");
	}else{
		printf("LARRY IS DEAD!");
	}

	return 0;
}