AC.cpp: In function 'long long int gcd(long long int, long long int)':
AC.cpp:10:26: warning: operation on 'p' may be undefined [-Wsequence-point]
AC.cpp:10:26: warning: operation on 'q' may be undefined [-Wsequence-point]
AC.cpp:10:26: warning: operation on 'q' may be undefined [-Wsequence-point]
AC.cpp: In function 'int main()':
AC.cpp:17:31: error: invalid operands of types 'int*' and 'long long int' to binary 'operator%'
AC.cpp:16:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
AC.cpp:22:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]