add aloha/2025cherry set
This commit is contained in:
19
storage/aloha/py/completed/2025cherry-div1-B.py
Normal file
19
storage/aloha/py/completed/2025cherry-div1-B.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import sys
|
||||
|
||||
input = sys.stdin.readline
|
||||
|
||||
|
||||
class SeongjunEncryption:
|
||||
def __init__(self, n, t):
|
||||
self.n = n
|
||||
self.t = t
|
||||
|
||||
def solve(self) -> bool:
|
||||
return self.t[0] == 'A' and self.t[-1] == 'B'
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
n = int(input())
|
||||
t = input().strip()
|
||||
|
||||
print("Yes" if SeongjunEncryption(n, t).solve() else "No")
|
||||
Reference in New Issue
Block a user