Submission #51281943
Source Code Expand
Copy
#!/usr/bin/env python3def is_bidirectional_arrow_string(s: str) -> bool:# 文字列が '<' で始まり、'>' で終わるかを確認if not (s.startswith('<') and s.endswith('>')):return False# 文字列から最初と最後の文字を除いた部分が '=' のみから構成されているかを確認middle_part = s[1:-1]if not all(char == '=' for char in middle_part):return False# 上記の条件を全て満たしていれば True、そうでなければ False を返すreturn TrueS=input()if is_bidirectional_arrow_string(S):print("Yes")else:print("No")
#!/usr/bin/env python3 def is_bidirectional_arrow_string(s: str) -> bool: # 文字列が '<' で始まり、'>' で終わるかを確認 if not (s.startswith('<') and s.endswith('>')): return False # 文字列から最初と最後の文字を除いた部分が '=' のみから構成されているかを確認 middle_part = s[1:-1] if not all(char == '=' for char in middle_part): return False # 上記の条件を全て満たしていれば True、そうでなければ False を返す return True S=input() if is_bidirectional_arrow_string(S): print("Yes") else: print("No")
Submission Info
Submission Time | |
---|---|
Task | A - Leftrightarrow |
User | tamakiiiiii |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 100 |
Code Size | 660 Byte |
Status | AC |
Exec Time | 57 ms |
Memory | 76696 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_00.txt, example_01.txt, example_02.txt |
All | example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_00.txt | AC | 57 ms | 76396 KB |
example_01.txt | AC | 56 ms | 76468 KB |
example_02.txt | AC | 56 ms | 76464 KB |
hand_00.txt | AC | 56 ms | 76492 KB |
hand_01.txt | AC | 55 ms | 76284 KB |
hand_02.txt | AC | 55 ms | 76620 KB |
hand_03.txt | AC | 56 ms | 76172 KB |
hand_04.txt | AC | 56 ms | 76324 KB |
hand_05.txt | AC | 55 ms | 76628 KB |
hand_06.txt | AC | 56 ms | 76696 KB |
hand_07.txt | AC | 55 ms | 76256 KB |
random_00.txt | AC | 56 ms | 76472 KB |
random_01.txt | AC | 56 ms | 76328 KB |
random_02.txt | AC | 56 ms | 76412 KB |
random_03.txt | AC | 56 ms | 76556 KB |
random_04.txt | AC | 56 ms | 76612 KB |
random_05.txt | AC | 56 ms | 76196 KB |
random_06.txt | AC | 56 ms | 76576 KB |
random_07.txt | AC | 56 ms | 76456 KB |
random_08.txt | AC | 56 ms | 76648 KB |
random_09.txt | AC | 57 ms | 76228 KB |
random_10.txt | AC | 56 ms | 76292 KB |
random_11.txt | AC | 56 ms | 76220 KB |
random_12.txt | AC | 55 ms | 76280 KB |
random_13.txt | AC | 56 ms | 76396 KB |