class myInteger {
private int n;
private boolean flag;
private myInteger fizzbuzzgizz
(int m,
String mes
) { if (this.n % m == 0) {
this.flag = false;
}
return this;
}
public myInteger(int n) { this.n = n; flag = true; }
public myInteger fizz() { return this.fizzbuzzgizz(3, "Fizz"); }
public myInteger buzz() { return this.fizzbuzzgizz(5, "Buzz"); }
public myInteger gizz() { return this.fizzbuzzgizz(7, "Gizz"); }
public void endl() {
if (flag == true)
else
}
}
public class Main {
public static void main
(String[] args
) {
new myInteger(1).fizz().buzz().gizz().endl();
new myInteger(3).fizz().buzz().gizz().endl();
new myInteger(5).fizz().buzz().gizz().endl();
new myInteger(7).fizz().buzz().gizz().endl();
new myInteger(15).fizz().buzz().gizz().endl();
new myInteger(21).fizz().buzz().gizz().endl();
new myInteger(35).fizz().buzz().gizz().endl();
new myInteger(105).fizz().buzz().gizz().endl();
new myInteger(997).fizz().buzz().gizz().endl();
}
}
/* end */
Y2xhc3MgbXlJbnRlZ2VyIHsKICBwcml2YXRlIGludCBuOwogIHByaXZhdGUgYm9vbGVhbiBmbGFnOwogIHByaXZhdGUgbXlJbnRlZ2VyIGZpenpidXp6Z2l6eihpbnQgbSwgU3RyaW5nIG1lcykgewogICAgaWYgKHRoaXMubiAlIG0gPT0gMCkgewogICAgICB0aGlzLmZsYWcgPSBmYWxzZTsKICAgICAgU3lzdGVtLm91dC5wcmludChtZXMpOwogICAgfQogICAgcmV0dXJuIHRoaXM7CiAgfQoKICBwdWJsaWMgbXlJbnRlZ2VyKGludCBuKSB7IHRoaXMubiA9IG47IGZsYWcgPSB0cnVlOyB9CiAgcHVibGljIG15SW50ZWdlciBmaXp6KCkgeyByZXR1cm4gdGhpcy5maXp6YnV6emdpenooMywgIkZpenoiKTsgfQogIHB1YmxpYyBteUludGVnZXIgYnV6eigpIHsgcmV0dXJuIHRoaXMuZml6emJ1enpnaXp6KDUsICJCdXp6Iik7IH0KICBwdWJsaWMgbXlJbnRlZ2VyIGdpenooKSB7IHJldHVybiB0aGlzLmZpenpidXp6Z2l6eig3LCAiR2l6eiIpOyB9CiAgcHVibGljIHZvaWQgZW5kbCgpIHsKICAgIGlmIChmbGFnID09IHRydWUpCiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbih0aGlzLm4pOwogICAgZWxzZQogICAgICBTeXN0ZW0ub3V0LnByaW50bG4oKTsKICB9Cn0KCnB1YmxpYyBjbGFzcyBNYWluIHsKICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAKICAgIG5ldyBteUludGVnZXIoMSkuZml6eigpLmJ1enooKS5naXp6KCkuZW5kbCgpOwogICAgbmV3IG15SW50ZWdlcigzKS5maXp6KCkuYnV6eigpLmdpenooKS5lbmRsKCk7CiAgICBuZXcgbXlJbnRlZ2VyKDUpLmZpenooKS5idXp6KCkuZ2l6eigpLmVuZGwoKTsKICAgIG5ldyBteUludGVnZXIoNykuZml6eigpLmJ1enooKS5naXp6KCkuZW5kbCgpOwogICAgbmV3IG15SW50ZWdlcigxNSkuZml6eigpLmJ1enooKS5naXp6KCkuZW5kbCgpOwogICAgbmV3IG15SW50ZWdlcigyMSkuZml6eigpLmJ1enooKS5naXp6KCkuZW5kbCgpOwogICAgbmV3IG15SW50ZWdlcigzNSkuZml6eigpLmJ1enooKS5naXp6KCkuZW5kbCgpOwogICAgbmV3IG15SW50ZWdlcigxMDUpLmZpenooKS5idXp6KCkuZ2l6eigpLmVuZGwoKTsKICAgIG5ldyBteUludGVnZXIoOTk3KS5maXp6KCkuYnV6eigpLmdpenooKS5lbmRsKCk7CiAgfQp9Ci8qIGVuZCAqLwo=