brunhilda.cpp: In function 'int main()':
brunhilda.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %d %d", &nPrime, &nQuery);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
brunhilda.cpp:12:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int p; scanf(" %d", &p);
~~~~~^~~~~~~~~~~
brunhilda.cpp:28:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int inp; scanf(" %d", &inp);
~~~~~^~~~~~~~~~~~~