/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'long int commonMultiple(long int, long int)':
foo.cpp:22:21: error: expression cannot be used as a function
 return (a/div)(b/div)div;
                     ^
foo.cpp:22:22: error: expected ';' before 'div'
 return (a/div)(b/div)div;
                      ^
foo.cpp:22:25: warning: statement has no effect [-Wunused-value]
 return (a/div)(b/div)div;
                         ^
foo.cpp: In function 'int main()':
foo.cpp:36:22: error: expected ')' before 'x'
 if(commonDivisor(div x, div y) == div && commonMultiple(div x, div y) == mul)
                      ^
foo.cpp:36:29: error: expected ')' before 'y'
 if(commonDivisor(div x, div y) == div && commonMultiple(div x, div y) == mul)
                             ^
foo.cpp:36:61: error: expected ')' before 'x'
 if(commonDivisor(div x, div y) == div && commonMultiple(div x, div y) == mul)
                                                             ^
foo.cpp:36:68: error: expected ')' before 'y'
 if(commonDivisor(div x, div y) == div && commonMultiple(div x, div y) == mul)
                                                                    ^
foo.cpp: In function 'long int commonMultiple(long int, long int)':
foo.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1131 最小公倍数和最大公约数问题
语言
C++
递交时间
2015-05-24 11:04:54
评测时间
2015-05-24 11:04:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes