Couldn't just cast for printfs %llu to unsigned long long int ?