Submission #2823586
Source Code Expand
import strutils, sequtils type seqStr = seq[string] var S = stdin.readLine.split T = newSeq[string]() proc judgeC(S: seqStr, n: int): bool = for i in 0 ..< n: if S[i] != "not": return return true proc judgeB(S: seqStr, n: int): bool = if S.len == n: return judgeC(S, n) proc judgeA(S: seqStr, n: int): bool = if S.len >= n: return judgeC(S, n) while S.len != 0: if judgeB(S, 3) or judgeB(S, 2): break if judgeA(S, 3) or not judgeA(S, 2): T.add S[0] S.delete 0 elif judgeA(S, 2): S.delete 0, 1 echo (T & S).join(" ")
Submission Info
Submission Time | |
---|---|
Task | A - 二重否定除去法則 |
User | ToshiroYanagi |
Language | Nim (0.13.0) |
Score | 0 |
Code Size | 608 Byte |
Status | CE |
Compile Error
Hint: system [Processing] Hint: Main [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: sequtils [Processing] Main.nim(32, 6) Error: expression 'echo([T & S])' has no type (or is ambiguous)