F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39396769_18027.cpp: In function 'int gcd(int, int)':
0_0_39396769_18027.cpp:5:26: error: no matching function for call to 'gcd(int)'
    5 |         return b==0?a:gcd(a%b);
      |                       ~~~^~~~~
In file included from .\stdc++.h:58:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:164:5: note: candidate: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)'
  164 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numeric:164:5: note:   template argument deduction/substitution failed:
0_0_39396769_18027.cpp:5:26: note:   candidate expects 2 arguments, 1 provided
    5 |         return b==0?a:gcd(a%b);
      |                       ~~~^~~~~
0_0_39396769_18027.cpp:3:5: note: candidate: 'int gcd(int, int)'
    3 | int gcd(int a,int b)
      |     ^~~
0_0_39396769_18027.cpp:3:5: note:   candidate expects 2 arguments, 1 provided


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-01 11:50:25, Gzip enabled