foo.cc: In function 'int main()':
foo.cc:7:5: error: 'scanf' was not declared in this scope
7 | scanf("%d",&n);
| ^~~~~
foo.cc:11:15: error: 'sqrt' was not declared in this scope
11 | num = sqrt(b1);
| ^~~~
foo.cc:14:20: error: 'gcd' was not declared in this scope
14 | if(gcd(j,a0)==a1&&j*b0/gcd(j,b0)==b1){
| ^~~
foo.cc:21:20: error: 'gcd' was not declared in this scope
21 | if(gcd(num2,a0)==a1&&num2*b0/gcd(num2,b0)==b1){
| ^~~
foo.cc:26:9: error: 'printf' was not declared in this scope
26 | printf("%d\n",count);
| ^~~~~~
foo.cc:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
+++ |+#include <cstdio>
1 | int main(){
[Hydro](https://hydro.ac)提供评测服务