Add tags

Add tags to the following comment

標準入力に対応させてみました

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <cstdlib>
#include <cstring>

void func(int m, int n = 0)
{
    char buf[BUFSIZ];
    int i = 1;
    int size = ::strlen(::itoa(n, buf, 10)) - 1;

    std::cout << n << std::endl;
    while(size--) i *= 10;
    if(m > n) return func(m, n+i);
}

int main(int argc, char* argv[])
{
    argc == 2 ? func(::atoi(argv[1])) : func(300);
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...