Submission #60751356


Source Code Expand

n,c1,c2 = input().split()
s = input()
n = int(n)
for i in range(n):
    
  if (s[i] == c1):
    s.replace("",c2)
  else:
    s = s.replace(s[i],c2)
print(s)

Submission Info

Submission Time
Task A - aaaadaa
User Iguzaxato
Language Python (CPython 3.11.4)
Score 100
Code Size 165 Byte
Status AC
Exec Time 10 ms
Memory 8688 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 19
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 9 ms 8488 KiB
00_sample_01.txt AC 9 ms 8516 KiB
00_sample_02.txt AC 9 ms 8640 KiB
00_sample_03.txt AC 9 ms 8512 KiB
01_handmade_00.txt AC 10 ms 8452 KiB
01_handmade_01.txt AC 10 ms 8488 KiB
01_handmade_02.txt AC 10 ms 8476 KiB
01_handmade_03.txt AC 10 ms 8608 KiB
01_handmade_04.txt AC 10 ms 8456 KiB
01_handmade_05.txt AC 10 ms 8456 KiB
01_handmade_06.txt AC 10 ms 8476 KiB
02_random_00.txt AC 10 ms 8520 KiB
02_random_01.txt AC 10 ms 8520 KiB
02_random_02.txt AC 10 ms 8616 KiB
02_random_03.txt AC 10 ms 8588 KiB
02_random_04.txt AC 10 ms 8688 KiB
02_random_05.txt AC 9 ms 8532 KiB
02_random_06.txt AC 10 ms 8432 KiB
02_random_07.txt AC 10 ms 8600 KiB