Compile Error

/in/foo.cc:3:1: error: 'll' does not name a type
 ll gcd(ll a,ll b){
 ^~
/in/foo.cc:13:1: error: 'll' does not name a type
 ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
 ^~
/in/foo.cc:14:1: error: 'll' does not name a type
 ll qscanf(){
 ^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:5: error: 'll' was not declared in this scope
     ll n;n=qscanf();
     ^~
/in/foo.cc:28:10: error: 'n' was not declared in this scope
     ll n;n=qscanf();
          ^
/in/foo.cc:28:19: error: 'qscanf' was not declared in this scope
     ll n;n=qscanf();
                   ^
/in/foo.cc:29:8: error: expected ';' before 'a'
     ll a[n];
        ^
/in/foo.cc:30:5: error: 'a' was not declared in this scope
     a[0]=qscanf();a[1]=qscanf();
     ^
/in/foo.cc:31:8: error: expected ';' before 'x'
     ll x=lcm(a[0],a[1]);
        ^
/in/foo.cc:34:9: error: 'x' was not declared in this scope
         x=lcm(x,a[i]);
         ^
/in/foo.cc:34:21: error: 'lcm' was not declared in this scope
         x=lcm(x,a[i]);
                     ^
/in/foo.cc:36:11: error: 'x' was not declared in this scope
     cout<<x;
           ^

信息

递交者
类型
递交
题目
P1326 5-4 最小公倍数
语言
C++
递交时间
2022-01-07 16:10:29
评测时间
2022-01-07 16:10:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes