proc putchar_unlocked(c:char){.header: "" .} proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scanf(formatstr: cstring){.header: "", varargs.} proc printf(formatstr: cstring){.header: "", varargs.} var S : array[2e6.int+10,char] scanf("%s",addr S) var x3 = 0 var x5 = 0 var isOdd = true for s in S: if s < '0': break let c = s.ord - '0'.ord x3 += c if isOdd: x5 += c else: x5 -= c isOdd = not isOdd if x3 mod 3 == 0: if x5 mod 5 == 0: echo "FizzBuzz" else: echo "Fizz" elif x5 mod 5 == 0 : echo "Buzz" else : printf("%s\n",addr S)