I was trying to solve a question on codeforces . I have to give input
1000000000 1000000000 1
to this code
#include <iostream>
using namespace std;
int main()
{
long n,m,a;
cin >> n >> m >>a ;
long b,c;
b = (n%a==0)?(n/a):((n/a)+1);
c = (m%a==0)?(m/a):((m/a)+1);
unsigned long long d ;
d = b*c ;
cout<<d;
But it gave me error
Diagnostics detected issues [cpp.clang++-diagnose]: p71.cpp:12:5: runtime error: signed
integer overflow: 1000000000 * 1000000000 cannot be represented in type 'long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p71.cpp:12:5 in
Then I got to know that I should add ULL suffix on a numeric literal. But how should I use ULL in this type of code;