#include #include #define DEBUG short N[50]; void getdigits(long long int num,short* N,short l){ int i; for (i = 0;i < l;i++){ N[i] = num % 10; num /= 10; } #ifdef DEBUG for (i = 0;i < l;i ++){ printf("N[%d]==>%d\n",i,N[i]); } #endif } int main (void){ long long int tmp; short l; short i; short check3 = 0; short check5 = 0; scanf("%lld",&tmp); l = (short)log10((double)tmp) + 1; getdigits(tmp,N,l); for (i = 0;i < l;i ++){ check3 += N[i]; if (i%2 == 0){ check5 += N[i]; } else{ check5 -= N[i]; } } if ((check3 % 3 == 0) && (check5 % 5 == 0)){ printf("FizzBuzz\n"); } else if (check3 % 3 == 0) { printf("Fizz\n"); } else if (check5 % 5 == 0) { printf("Buzz\n"); } else { printf("%lld\n",tmp); } return 0; }