#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
void print_factorial(uint64_t num){
uint64_t fact = 1, i = 1, ans;
while(num/fact > i){
i++;
fact*=i;
}
for(i; i > 0; i--){
ans = num/fact;
num = num - ans*fact;
fact/=i;
}
}
int main(){
uint64_t num, res;
if( res != 1 || num < 1) {
}
print_factorial(num);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0ZGludC5oPgoKdm9pZCBwcmludF9mYWN0b3JpYWwodWludDY0X3QgbnVtKXsKICAgICAgICB1aW50NjRfdCBmYWN0ID0gMSwgaSA9IDEsIGFuczsKICAgICAgICB3aGlsZShudW0vZmFjdCA+IGkpewogICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICAgICAgZmFjdCo9aTsKCiAgICAgICAgfQogICAgICAgIGZvcihpOyBpID4gMDsgaS0tKXsKICAgICAgICAgICAgICAgIGFucyA9IG51bS9mYWN0OwogICAgICAgICAgICAgICAgbnVtID0gbnVtIC0gYW5zKmZhY3Q7CiAgICAgICAgICAgICAgICBmYWN0Lz1pOwogICAgICAgICAgICAgICAgcHJpbnRmKCIldS4iLCBhbnMpOwogICAgICAgIH0KCiAgICAgICAgcHJpbnRmKCJcbiIpOwoKfQoKaW50IG1haW4oKXsKICAgICAgICB1aW50NjRfdCBudW0sIHJlczsKICAgICAgICByZXMgPSBzY2FuZigiJXUiLCAmbnVtKTsKICAgICAgICBpZiggcmVzICE9IDEgfHwgbnVtIDwgMSkgewogICAgICAgICAgICAgICAgcHJpbnRmKCJXcm9uZyBpbnB1dFxuIik7CiAgICAgICAgICAgICAgICBhYm9ydCgpOwogICAgICAgIH0KICAgICAgICBwcmludF9mYWN0b3JpYWwobnVtKTsKCQlyZXR1cm4gMDsKfQ==