Submission #5657793


Source Code Expand

Copy
#include<iostream>
using namespace std;

int main() {
  int a;
  cin >> a;
  cout >> a % 9;
}

Submission Info

Submission Time
Task ABC081A - Placing Marbles
User nkiyo
Language C++14 (GCC 5.4.1)
Score 0
Code Size 100 Byte
Status

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:8: error: no match for ‘operator>>’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘int’)
   cout >> a % 9;
        ^
./Main.cpp:7:8: note: candidate: operator>>(int, int) <built-in>
./Main.cpp:7:8: note:   no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream<char>}’ to ‘int’
In file included from /usr/include/c++/5/string:53:0,
                 from /usr/include/c++/5/bits/locale_classes.h:40,
                 from /usr/include/c++/5/bits/ios_base.h:41,
                 from /usr/include/c++/5/ios:42,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from ./Main.cpp:1:
/usr/include/c++/5/bits/basic_string.tcc:1437:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&)
     operator>>(basi...