Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
143464 吕毅心 公约数问题 C++ Compile Error 0 MS 0 KB 418 2026-01-15 19:50:20

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; long long x(int a,int b){ c=a%b; if(c==0){ return b; }return(b,c); } int main(){ int a,b; cin>>a>>b; cout<<x(a,b); return 0; }


Run Info:

Main.cc: In function 'long long int x(int, int)':
Main.cc:8:5: error: 'c' was not declared in this scope
     c=a%b;
     ^