将pascal改成python代码存入字符串,并用exec直接执行字符串内代码
def solve(): a=0;b=0;c=0 s=list(input()) t=[] for i in s: if i!=':': t.append(i) t.append('print(a,b,c)') s=''.join(t) exec(s) return test=1 # test=int(input()) for _ in range(test): solve()