P3.cpp: In function 'int main()':
P3.cpp:12:17: warning: unused variable 'A' [-Wunused-variable]
ll v, ans = 0, A, B, g, X;
^
P3.cpp:12:20: warning: unused variable 'B' [-Wunused-variable]
ll v, ans = 0, A, B, g, X;
^
P3.cpp:12:23: warning: unused variable 'g' [-Wunused-variable]
ll v, ans = 0, A, B, g, X;
^
P3.cpp:12:26: warning: unused variable 'X' [-Wunused-variable]
ll v, ans = 0, A, B, g, X;
^
P3.cpp:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d", &P, &Q, &N, &K);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~