#include <stdio.h>
void f835(int n) {
int x = n / 6;
int y = n % 6;
int i;
unsigned long long d = 1ULL;
for (i = 0; i < x; i++) {
d *= 9ULL;
}
if (y == 5) {
d *= 6ULL;
} else if (y > 0) {
d *= (unsigned long long)y;
}
printf("x=%d -> %llu\n", n
, d
); }
int main(void) {
// your code goes here
f835(10);
f835(64);
f835(100);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGY4MzUoaW50IG4pIHsKCWludCB4ID0gbiAvIDY7CglpbnQgeSA9IG4gJSA2OwoJaW50IGk7Cgl1bnNpZ25lZCBsb25nIGxvbmcgZCA9IDFVTEw7Cglmb3IgKGkgPSAwOyBpIDwgeDsgaSsrKSB7CgkJZCAqPSA5VUxMOwoJfQoJaWYgKHkgPT0gNSkgewoJCWQgKj0gNlVMTDsKCX0gZWxzZSBpZiAoeSA+IDApIHsKCQlkICo9ICh1bnNpZ25lZCBsb25nIGxvbmcpeTsKCX0KCXByaW50ZigieD0lZCAtPiAlbGx1XG4iLCBuLCBkKTsKfQoKaW50IG1haW4odm9pZCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJCglmODM1KDEwKTsKCWY4MzUoNjQpOwoJZjgzNSgxMDApOwoJCglyZXR1cm4gMDsKfQo=