Official

A - Slot Editorial by en_translator


If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from “practicecontest” (https://atcoder.jp/contests/practice/). There you can find a sample code for each language.


This problem can be solved by receiving input as a string and checking if each character are the same.

Sample Code (C)

#include <stdio.h>
int main(){
	char s[9];
	scanf("%s",s);
	if(s[0]==s[1]&&s[1]==s[2]){
		printf("Won");
	}else{
		printf("Lost");
	}
}

Sample Code (Python)

s=input()
if s[0]==s[1] and s[1]==s[2]:
	print("Won")
else:
	print("Lost")

posted:
last update: