/ ep /

记录详情

Compile Error

/in/foo.cc:10:5: error: conflicting declaration 'int ans'
 int ans;
     ^~~
/in/foo.cc:3:11: note: previous declaration as 'long long int ans'
 long long ans,outp=1,x,n,m,k;
           ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:14:23: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}' and 'long long int')
  cout<<ans=(x+m*outp)%n;
                       ^
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/ostream:402:7: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]
       operator=(basic_ostream&& __rhs)
       ^~~~~~~~
/usr/include/c++/6/ostream:402:7: note:   no known conversion for argument 1 from 'long long int' to 'std::basic_ostream<char>&&'

信息

递交者
类型
递交
题目
P1003 转圈游戏
语言
C++
递交时间
2019-08-30 23:18:23
评测时间
2019-08-30 23:18:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes