#K40397. Lantern Lighting
Lantern Lighting
Lantern Lighting
You are given a non-empty string s
consisting only of the characters A
and B
. Your task is to determine whether it is possible to light up at least one lantern. A lantern lights up if and only if there is at least one A
in the string.
Formally, let \(s\) be a string, then print "Yes" if \(s\) contains the character A
(i.e. \(\exists i, s_i = A\)) and "No" otherwise.
Example:
- Input: BBAAB → Output: Yes
- Input: BB → Output: No
inputFormat
The input consists of a single line containing a non-empty string s
made up of characters 'A' and 'B'.
outputFormat
Output "Yes" if there is at least one 'A' in the string; otherwise, output "No".
## sampleBBAAB
Yes