Guest User

Untitled

a guest
Sep 30th, 2019
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. using ull = unsigned long long;
  2. ull p(long a){
  3.   ull res;
  4.   if (a<0) return 0;
  5.   if (a==0 || a==1) return 1;
  6.   return p(a-1)+p(a-2)-p(a-5)-p(a-7);
  7. }
  8. ull exp_sum(unsigned int n) {
  9.   return p(n);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment