local str = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991" local len = #str local t, kuri = {}, {} for i = 1, len do t[i] = tonumber(str:sub(len + 1 - i, len + 1 - i)) kuri[i] = 0 end kuri[len + 1], kuri[len + 2] = 0, 0 local n = io.read("*n") for i = 1, len do local num = t[i] * n + kuri[i] t[i] = num % 10 local kuri2 = math.floor(num / 100) kuri[i + 2] = kuri[i + 2] + kuri2 kuri[i + 1] = kuri[i + 1] + math.floor((num - kuri2 * 100) / 10) end t[len + 1] = kuri[len + 1] t[len + 2] = kuri[len + 2] if(0 < t[len + 2]) then io.write(t[len + 2]) end io.write(t[len + 1] .. ".") for i = len, 1, -1 do io.write(t[i]) end io.write("\n")