Big gcd ,one test case is failing

#include<bits/stdc++.h>
//#include
#define ll long long
using namespace std;
ll gcd(ll a,ll b)
{
if(!a)
{return b;}
else{
gcd(b%a,a);
}
}
ll resolve(ll num,char a[])
{
ll mod=0;
for(ll i=0;i<strlen(a);i++)
{
mod=(mod*10+a[i]-‘0’)%num;
}
return mod;
}
#define ll long long
int main()
{
ll n;
char a[255];
cin>>n;
cin>>a;
ll x;
x=resolve(n,a);
ll y=gcd(n,x);
cout<<y<<endl;
return 0;

}

Share your code via CB IDE with proper indentation

10^250 is the length of numbers. Can you store it in long long?
You need to store in strings and then work on them

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.