题解:P1597 语句解析

· · 题解

解法

py 大法好!直接用 replace 函数将 : 替换为空,并用 exec 赋值变量,最后输出。

最短代码

a=b=c=0;exec(input().replace(':',''));print(a,b,c)