From 5b4bcc63d391df39727574f9037d1c5e61bc28c9 Mon Sep 17 00:00:00 2001 From: Ekta Sharma <65890887+ekta123s@users.noreply.github.com> Date: Wed, 30 Sep 2020 23:12:29 -0700 Subject: [PATCH] Update a8c9.c --- a8c9.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/a8c9.c b/a8c9.c index ff5e08f..4b01716 100644 --- a/a8c9.c +++ b/a8c9.c @@ -1,4 +1,4 @@ -#include +/*#include int main() { int n,x,i,s=0; @@ -16,5 +16,75 @@ int main() } printf("sum of last digits are %d",s); } + +*/ +Updated Using Recursion +//More Efficient +#include +using namespace std; +#define ll long long +#define rep(i,j,n) for(ll i=j;i>n; + int result = solve(n); + cout <