QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#621139#5436. DRX vs. T1zhoudashuaiAC ✓15ms10616kbPython3213b2024-10-08 09:41:442024-10-08 09:41:45

Judging History

你现在查看的是最新测评结果

  • [2024-10-08 09:41:45]
  • 评测
  • 测评结果:AC
  • 用时:15ms
  • 内存:10616kb
  • [2024-10-08 09:41:44]
  • 提交

answer

import sys

s = list(sys.stdin.readline().strip())
d, t = 0, 0
for i in range(len(s)):
    if s[i] == 'T': t += 1
    elif s[i] == 'D': d += 1
    if d ==3 or t == 3: break
print("T1" if t == 3 else "DRX")

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 7ms
memory: 10484kb

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

score: 0
Accepted
time: 15ms
memory: 10484kb

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

score: 0
Accepted
time: 14ms
memory: 10588kb

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

score: 0
Accepted
time: 14ms
memory: 10568kb

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

score: 0
Accepted
time: 3ms
memory: 10616kb

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

score: 0
Accepted
time: 7ms
memory: 10472kb

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

score: 0
Accepted
time: 10ms
memory: 10516kb

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

score: 0
Accepted
time: 3ms
memory: 10448kb

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

score: 0
Accepted
time: 14ms
memory: 10500kb

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

score: 0
Accepted
time: 10ms
memory: 10584kb

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

score: 0
Accepted
time: 12ms
memory: 10576kb

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

score: 0
Accepted
time: 10ms
memory: 10584kb

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

score: 0
Accepted
time: 14ms
memory: 10456kb

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

score: 0
Accepted
time: 15ms
memory: 10484kb

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

score: 0
Accepted
time: 15ms
memory: 10400kb

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

score: 0
Accepted
time: 15ms
memory: 10488kb

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

score: 0
Accepted
time: 15ms
memory: 10460kb

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

score: 0
Accepted
time: 15ms
memory: 10448kb

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

score: 0
Accepted
time: 15ms
memory: 10500kb

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

score: 0
Accepted
time: 15ms
memory: 10576kb

input:

TTT??

output:

T1

result:

ok single line: 'T1'