Skip to content

Instantly share code, notes, and snippets.

@showyou
Created August 5, 2018 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save showyou/03f9de83a07890c586d8be45c4f087ca to your computer and use it in GitHub Desktop.
Save showyou/03f9de83a07890c586d8be45c4f087ca to your computer and use it in GitHub Desktop.
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