Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <string>
- #include <vector>
- using namespace std;
- long long r;
- void func(string &s) {
- r += s.size();
- }
- int main() {
- for (int i = 1; i < 1e10; i ++) {
- char tmp[13];
- string input;
- for (int j = 0, x = i; x > 0; j ++, x /= 10) {
- tmp[j] = (x % 10) + '0';
- tmp[j + 1] = 0;
- }
- input = string(tmp);
- func(input);
- }
- printf("%lld\n", r);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement