D - FizzBuzz Sum Hardhttps://atcoder.jp/contests/abc253/tasks/abc253_d
void solve(){
scanf("%lld %lld %lld",&n,&a,&b);
ll tmp=(n+1)*n/2;
ll rec1=n/a,rec2=n/b;
ll tmp1=(a+a*rec1)*rec1/2;
ll tmp2=(b+b*rec2)*rec2/2;
ll g=__gcd(a,b);
ll lcm=a*b/g;
ll rec3=n/lcm;
ll tmp3=(lcm+lcm*rec3)*rec3/2;
printf("%lld",tmp-(tmp1+tmp2-tmp3));
}