QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#705984#8060. Attendancejerry2423WA 15ms10740kbPython3294b2024-11-03 05:13:012024-11-03 05:13:01

Judging History

This is the latest submission verdict.

  • [2024-11-03 05:13:01]
  • Judged
  • Verdict: WA
  • Time: 15ms
  • Memory: 10740kb
  • [2024-11-03 05:13:01]
  • Submitted

answer

count = int(input())
names = [input().strip() for _ in range(count)]
names.append("")

missing = 0
for i in range(count):
    prev, cur = names[i], names[i + 1]
    if cur != "Present!" and prev != "Present!":
        print(prev)
        missing += 1

if missing == 0:
    print("No absences!")

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 10740kb

input:

6
Buckley
Burnadette
Present!
Chad
Present!
Erin

output:

Buckley
Erin

result:

ok 2 lines

Test #2:

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

input:

3
Alice
Bob
Charlie

output:

Alice
Bob
Charlie

result:

ok 3 lines

Test #3:

score: -100
Wrong Answer
time: 8ms
memory: 10640kb

input:

8
Gregory
Present!
Maureen
Present!
Milton
Present!
Xavier
Present!

output:

No absences!

result:

wrong answer 1st lines differ - expected: 'No Absences', found: 'No absences!'