CF620B.Grandfather Dovlet’s calculator

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Once Max found an electronic calculator from his grandfather Dovlet's chest. He noticed that the numbers were written with seven-segment indicators (https://en.wikipedia.org/wiki/Seven-segment_display).

Max starts to type all the values from aa to bb . After typing each number Max resets the calculator. Find the total number of segments printed on the calculator.

For example if a=1a=1 and b=3b=3 then at first the calculator will print 22 segments, then — 55 segments and at last it will print 55 segments. So the total number of printed segments is 1212 .

输入格式

The only line contains two integers a,ba,b ( 1<=a<=b<=1061<=a<=b<=10^{6} ) — the first and the last number typed by Max.

输出格式

Print the only integer aa — the total number of printed segments.

输入输出样例

  • 输入#1

    1 3
    

    输出#1

    12
    
  • 输入#2

    10 15
    

    输出#2

    39
    
首页