Created
August 5, 2018 14:01
-
-
Save showyou/03f9de83a07890c586d8be45c4f087ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S = input() | |
flag = 'WA' | |
if S[0] == 'A': | |
ss = S[1] | |
s = S[2:] | |
cnt_c = 0 | |
for i in range(len(s)-1): | |
m = s[i] | |
if m == 'C': | |
cnt_c += 1 | |
#print(s[i]) | |
m = 'c' | |
ss += m | |
ss += s[-1:] | |
#print(ss) | |
if cnt_c == 1 and ss.islower(): | |
flag = 'AC' | |
print(flag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment