#798. 默契数字T1

默契数字T1

Cannot parse: (0 , import_utils.normalizeSubtasks) is not a function or its return value is not iterable

题目描述

如果两个整数X,YX,Y,满足当XX的最高位等于YY的个位,且YY的最高位等于XX的个位时,我们称X,Y(X,Y)是一对默契数对

这里的默契数对是严格的数对,即对于不同的XXYY(X,Y)(X,Y)(Y,X)(Y,X)是不同的默契数对

现在蜗牛老师想知道,给定一个整数NN,有多少对不同的(X,Y)(X,Y)默契数对

输入格式

一行一个正整数NN

输出格式

一个整数表示答案。

样例数据

input

11

output

12

合法的12对默契数为:(1,1),(1,11),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(11,1),(11,11).

数据规模与约定

对于40%的数据,满足N<=10

对于70%的数据,满足N<=2000

对于100%的数据,满足N<=200000

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

Background

Special for beginners, ^_^

Description

Given two integers x and y, print the sum.

Format

Input

Two integers x and y, satisfying 0x,y327670\leq x,y\leq 32767 .

Output

One integer, the sum of x and y.

Samples

123 500
623

Limitation

1s, 1024KiB for each test case.