AtCoder Beginner Contest 001

Submission #3732981

Source codeソースコード

#include <iostream>
#include <string>
#include <boost/lexical_cast.hpp>

int main() {
    std::string a;
    std::getline(std::cin, a);
    std::string b;
    std::getline(std::cin, b);
    std::cout << (lexical_cast<int>(a) - lexical_cast<int>(b)) << std::endl;
}

Submission

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

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

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:19: error: ‘lexical_cast’ was not declared in this scope
std::cout << (lexical_cast<int>(a) - lexical_cast<int>(b)) << std::endl;
^
./Main.cpp:10:19: note: suggested alternative:
In file included from ./Main.cpp:3:0:
/opt/boost/gcc/include/boost/lexical_cast.hpp:92:19: note: ‘boost::lexical_cast’
inline Target lexical_cast(const char32_t* chars, std::size_t count)
^
./Main.cpp:10:32: error: expected primary-expression before ‘int’
std::cout << (lexical_cast<int>(a) - lexical_cast<int>(b)) << std::endl;
^
./Main.cpp:10:32: error: expected ‘)’ before ‘int’

Test case