Submission #2823474


Source Code Expand

const
  n3 = "not not not"
  n3s = "not not not "
  n2s = "not not "
  n1s = "not "

var
  S = readLine stdin
  T =  ""

proc judge(S, s: string): bool =
  if S.len >= s.len and S[0 .. s.high] == s:
    return true

while S.len != 0 and S != n3:
  if judge(S, n3s):
    add T, n1s
    S = S[n1s.len .. ^1]
  elif judge(S, n2s):
    S = S[n2s.len .. ^1]
  else:
    add T, S[0]
    S = S[1 .. ^1]

echo T & S

Submission Info

Submission Time
Task A - 二重否定除去法則
User ToshiroYanagi
Language Nim (0.13.0)
Score 0
Code Size 433 Byte
Status WA
Exec Time 5 ms
Memory 8320 KB

Compile Error

Hint: system [Processing]
Hint: Main [Processing]
Hint:  [Link]
Hint: operation successful (9922 lines compiled; 1.603 sec total; 10.107MB; Release Build) [SuccessX]

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 16
WA × 3
Set Name Test Cases
All scrambled_00.txt, scrambled_01.txt, scrambled_02.txt, scrambled_03.txt, scrambled_04.txt, scrambled_05.txt, scrambled_06.txt, scrambled_07.txt, scrambled_08.txt, scrambled_09.txt, scrambled_10.txt, scrambled_11.txt, scrambled_12.txt, scrambled_13.txt, scrambled_14.txt, scrambled_15.txt, scrambled_16.txt, scrambled_17.txt, scrambled_18.txt
Case Name Status Exec Time Memory
scrambled_00.txt AC 1 ms 256 KB
scrambled_01.txt AC 1 ms 256 KB
scrambled_02.txt AC 1 ms 256 KB
scrambled_03.txt AC 1 ms 256 KB
scrambled_04.txt AC 1 ms 256 KB
scrambled_05.txt WA 3 ms 3200 KB
scrambled_06.txt AC 2 ms 2816 KB
scrambled_07.txt WA 2 ms 2816 KB
scrambled_08.txt WA 2 ms 2816 KB
scrambled_09.txt AC 5 ms 8320 KB
scrambled_10.txt AC 5 ms 8320 KB
scrambled_11.txt AC 5 ms 8320 KB
scrambled_12.txt AC 5 ms 8320 KB
scrambled_13.txt AC 5 ms 8320 KB
scrambled_14.txt AC 5 ms 8320 KB
scrambled_15.txt AC 5 ms 8320 KB
scrambled_16.txt AC 5 ms 8320 KB
scrambled_17.txt AC 5 ms 8320 KB
scrambled_18.txt AC 5 ms 8320 KB