Decimal expansion program running very slow for large inputs
问题 I am writing a program to calculate the decimal expansion on the number 103993/33102 and I want to print out all of the trailing decimals depending on what number the user inputs. It runs quickly for all number up to 10^5 but if input 10^6 to program takes around 5 minutes to print out an answer. How can I speed things up? I have tried two different approaches one using BigDecimal and the other using strings and neither one is working efficiently. public static void main(String[] args) throws