Số có tổng các chữ số là số nguyên tố

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 1G
Input: stdin
Output: stdout

Author:
Problem type

Có bao nhiêu số từ A đến B mà tổng các chữ số của nó là số nguyên tố.

Input: Hai số A, B ~(0 <A≤B≤ 10^8)~.</p>

Output: Số lượng số tìm được

Ví dụ:
INPUT
7 20
OUTPUT
6

Giải thích: Có 6 số thoả mãn là 7, 11, 12, 14, 16, 20


Comments

Please read the guidelines before commenting.


There are no comments at the moment.