CHUAN1 Số chuẩn_1 (24-25 TS10 DANANG)
Nộp bài giải
Điểm:
0,50 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Dạng bài
Ngôn ngữ cho phép
C, C#, C++, Java, Javascript, Kotlin, Pascal, Python, Scratch
Link đề: https://www.chuyentin.pro/2025/09/e-thi-tuyen-sinh-lop-10-thanh-pho-nang.html
Sample Input 1
10 99
Sample Output 1
9
Bình luận
C++20 nè
include <bits/stdc++.h>
using namespace std; using ll = long long;
ll dp[12][205][2][2][12]; string s;
ll f(int pos, int diff, bool tight, bool started, int len) { if (pos == s.size()) return started && diff == 1;
}
ll solve(ll x) { if (x <= 0) return 0; s = to_string(x); memset(dp, -1, sizeof(dp)); return f(0, 0, 1, 0, 0); }
int main() { ll A, B; cin >> A >> B; cout << solve(B) - solve(A - 1); }