QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#278822 | #5660. Simplified Genome Translation | dat# | RE | 0ms | 0kb | Python3 | 924b | 2023-12-07 21:00:54 | 2023-12-07 21:00:54 |
answer
import sys
sys.stdin = open("input.txt", "r")
sys.stdout = open("output.txt", "w")
n = int(input())
ra = """F UUU UUC
L UUA UUG CUU CUC CUA CUG
I AUU AUC AUA
M AUG
V GUU GUC GUA GUG
S UCU UCC UCA UCG AGU AGC
P CCU CCC CCA CCG
T ACU ACC ACA ACG
A GCU GCC GCA GCG
Y UAU UAC
H CAU CAC
Q CAA CAG
N AAU AAC
K AAA AAG
D GAU GAC
E GAA GAG
C UGU UGC
W UGG
R CGU CGC CGA CGG AGA AGG
G GGU GGC GGA GGG
STOP UAA UAG UGA"""
m = [(e.split()[0], e.split()[1:]) for e in ra.split('\n')]
m = dict(m)
for _ in range(n):
s = input()
is_done = False
for i in range(len(s)//3 + 1):
sub_s = s[3*i:3*(i + 1)]
for p, k in m.items():
if sub_s in k:
if p == "STOP":
is_done = True
break;
print(p, end='')
if is_done:
break
print()
详细
Test #1:
score: 0
Dangerous Syscalls
input:
5 UUUUAACACUUUAUCACUUAACACCAC CAAAAUAUGAAAAAU AUGUACUUUGCGUUUCACUAA UUGCACUACUAC UACGUGGGUAUC