Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int a, b, ans;
- int v[] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};
- int main() {
- ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- cin >> a >> b;
- for(int i=a;i<=b;i++) for(char j : to_string(i)) ans += v[int(j -'0')];
- cout << ans << endl;
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement