using System; using System.IO; using System.Linq; using System.Collections.Generic; using System.Text; public class Program { public void Proc() { String inpt = Reader.ReadLine(); int[] list = inpt.Select(a => int.Parse(a.ToString())).ToArray(); string ans = ""; if(list.Sum() % 3 == 0) { ans = "Fizz"; } if(CanBuzz(inpt)) { ans += "Buzz"; } if(ans.Length == 0) { ans = inpt.ToString(); } Console.WriteLine(ans); } private bool CanBuzz(string input) { if(input.Length == 1 && input[0] == '0') { return true; } string tmp = input; while(tmp.Length > 11) { long num = long.Parse(tmp.Substring(0, 11)); num = num % 11; tmp = num + tmp.Substring(11); } if(tmp.Length == 0) { return true; } return long.Parse(tmp) % 11 == 0; } private int ToDec(int num) { int ans = 0; if(num == 0) { return 0; } int[] tmp = num.ToString().Select(a => int.Parse(a.ToString())).Reverse().ToArray(); ans += tmp[0]; int mul = 4; for (int i = 1; i < tmp.Length; i++) { ans += mul * tmp[i]; mul = mul * 4; } return ans; } public class Reader { private static StringReader sr; public static bool IsDebug = false; public static string ReadLine() { if (IsDebug) { if (sr == null) { sr = new StringReader(InputText.Trim()); } return sr.ReadLine(); } else { return Console.ReadLine(); } } private static string InputText = @" 55 "; } public static void Main(string[] args) { #if DEBUG Reader.IsDebug = true; #endif Program prg = new Program(); prg.Proc(); } }