Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78342 田苒彤 15求两个数的最大公约数 C++ Compile Error 0 MS 0 KB 226 2024-06-18 19:11:23

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main (){ long long i=1,c; long long bc,cs; cin>>bc>>cs; while(bcs%cs!=0){ yu=bcs%cs; bcs=cs; cs=yu; } cout<<cs; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:11: error: 'bcs' was not declared in this scope
     while(bcs%cs!=0){
           ^
Main.cc:8:9: error: 'yu' was not declared in this scope
         yu=bcs%cs;
         ^
Main.cc:4:12: warning: unused variable 'i' [-Wunused-variable]
  long long i=1,c;
            ^
Main.cc:4:16: warning: unused variable 'c' [-Wunused-variable]
  long long i=1,c;
                ^