Submission #1572483


Source Code Expand

#include <iostream>
using namespace std;

int main() {
    int A, B;
    cin >> A >> B;

    int count[11] = {0, 1, 2, 3, 2, 1, 2, 3, 3, 2, 1};
    int ans = 0;
    ans = (abs(A - B) / 10) + count[abs(A - B) % 10]
    cout << ans << endl;

    return 0;
}

Submission Info

Submission Time
Task B - リモコン
User tapioka703
Language C++14 (GCC 5.4.1)
Score 0
Code Size 270 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:11:5: error: expected ‘;’ before ‘cout’
     cout << ans << endl;
     ^