fork(1) download
  1. #include <cmath>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a,b;
  7. if(sqrt(a*b)==floor(sqrt(a*b))) {cout<<sqrt(a*b); return 0;}
  8. else cout<<0;
  9. return 0;
  10. }
Success #stdin #stdout 0s 4572KB
stdin
1 4
stdout
Standard output is empty