M_A_Noman's blog

By M_A_Noman, 13 months ago, In English

Help me to know whether there are any processes in C++ by applying which I can find out whether the decimal representation of p/q is a rational number or an irrational number.

For example 10/4 = 2.5 is a rational number where 10/3 = 3.3333333 is an irrational number

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By M_A_Noman, history, 17 months ago, In English

Please help to calculate the time complexity of the following code

Code

Can this code pass in 1 second for large value of both n and m which can be in the rang of 1 - 1e9 The range of the test case is 10^4

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it