Submission #75452586


Source Code Expand

S = list(input())
string = len(S)
lim = string - 1
for i in range(0, len(S)):
  j = 1
  while j <= lim:
    if S[i+j-1] != S[i+j]:
      string += 1
    else:
      break
    j += 1
  lim -= 1
print(string % 998244353)

Submission Info

Submission Time
Task C - Not Adjacent
User chikaraispower
Language Python (CPython 3.13.7)
Score 0
Code Size 230 Byte
Status TLE
Exec Time > 2000 ms
Memory 11680 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 24
TLE × 4
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All min.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, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
min.txt AC 11 ms 8860 KiB
random_01.txt TLE > 2000 ms 11636 KiB
random_02.txt TLE > 2000 ms 10968 KiB
random_03.txt TLE > 2000 ms 11596 KiB
random_04.txt AC 1907 ms 9892 KiB
random_05.txt TLE > 2000 ms 11636 KiB
random_06.txt AC 1820 ms 9956 KiB
random_07.txt AC 506 ms 11512 KiB
random_08.txt AC 180 ms 9892 KiB
random_09.txt AC 488 ms 11436 KiB
random_10.txt AC 156 ms 11164 KiB
random_11.txt AC 187 ms 11508 KiB
random_12.txt AC 24 ms 9128 KiB
random_13.txt AC 124 ms 11472 KiB
random_14.txt AC 96 ms 10924 KiB
random_15.txt AC 122 ms 11640 KiB
random_16.txt AC 40 ms 10020 KiB
random_17.txt AC 90 ms 11440 KiB
random_18.txt AC 63 ms 10668 KiB
random_19.txt AC 77 ms 11640 KiB
random_20.txt AC 26 ms 9516 KiB
random_21.txt AC 72 ms 11476 KiB
random_22.txt AC 51 ms 10708 KiB
random_23.txt AC 65 ms 11680 KiB
random_24.txt AC 21 ms 9336 KiB
random_25.txt AC 62 ms 11388 KiB
sample_01.txt AC 11 ms 8920 KiB
sample_02.txt AC 12 ms 8848 KiB