AtCoder Beginner Contest 004

Submission #2691209

Source codeソースコード

#include <iostream>

/*高橋君は N円借金をしました。
倍返しでおもてなしするのが流行だと小耳に挟んだ高橋君は、2*N円返済します。
高橋君が返済する金額2*N円を出力してください。*/

using namespace std;

int main(){
	int N;
	cin >> N;
	cout >> 2 * N >> endl;
}

Submission

Task問題 A - 流行
User nameユーザ名 ban
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 CE
Score得点 -
Source lengthソースコード長 336 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:7: error: no match for ‘operator>>’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘int’)
cout >> 2 * N >> endl;
^
./Main.cpp:12:7: note: candidate: operator>>(int, int) <built-in>
./Main.cpp:12:7: 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>&)
operat...

Test case