ika #7266(2008/08/20 02:40 GMT) [ D ] Rating0/0=0.00
標準入力から。
この手の文字列操作はガーベジコレクタのおかげでたやすくできます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import std.stdio, std.string; void main() { auto t = chomp(readln), s = "0".dup; while(s.length < t.length || s <= t) { writeln(s); if(s[0] < '9') { s[0]++; } else { s = "10" ~ s[1 .. $]; } } }
Rating0/0=0.00-0+
[ reply ]
ika
#7266()
[
D
]
Rating0/0=0.00
標準入力から。
この手の文字列操作はガーベジコレクタのおかげでたやすくできます。
Rating0/0=0.00-0+
[ reply ]