add aloha/2025cherry set

This commit is contained in:
2025-05-17 17:25:42 +09:00
parent 8158c38e23
commit bac11c76e0
4 changed files with 137 additions and 0 deletions

View 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")