K-DIGITS

View as PDF

Submit solution


Points: 0.61 (partial)
Time limit: 1.0s
Memory limit: 256M
Input: stdin
Output: stdout

Problem source:
..................
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

Tìm tất cả các số trong hệ ~K~ phân có ~N~ chữ số, trong đó không có ~2~ chữ số ~0~ nào đứng cạnh nhau

VD: ~N = 7~ và ~K = 10~

  • Số ~1030650~ thỏa mãn điều kiện
  • Số ~1000179~ không thỏa mãn điều kiện
  • Số ~0555555~ không thỏa mãn điều kiện

Input

~2~ số ~N~ và ~K(K > 1~; ~N > 0)~;

Output

Kết quả bài toán

Giới hạn

  • ~20\%~ test có ~k = 2~; ~n \le 100~
  • ~20\%~ test có ~k \le 5~; ~n \le 1000~
  • ~20\%~ test có ~k \le 10~; ~n \le 2000~
  • ~20\%~ test có ~k \le 10~; ~n \le 10000~
  • ~20\%~ test có ~k \le 1000~; ~n \le 1000~

Sample Input

2 10

Sample Output

90

Comments

Please read the guidelines before commenting.


There are no comments at the moment.