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
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

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<AB108).</p>

Output:

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

Ví dụ:
INPUT
Copy
7 20
OUTPUT
Copy
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.