Monday, October 1, 2018

UVa problem solution reverse and add -10018

Discuss: in this problem just simply reverse the digit using very naive process that is also fine. and then whether it is palindrome or not if it is not palindrome then repeat the process for newly create number. you will get your answer,
there is no tricky part  in this problem.

try yourself, before see the code


Saturday, September 29, 2018

UVa problem solution 10523 - Very Easy !!!

problem link:

Discuss: there is many approach to solve this problem. i using java language since it has BigInteger class. if you know java and function of BigInteger then it's very naive problem to you. don't forget to name your class Main(capital M) this is for UVa.

try yourself, before see the code


UVa problem solution 623 - 500!

Problem link:

Discuss: you can solve the problem in many way. but java is naive one. if you know about java BigInteger function and how it works. then just find factorial using any loop. but one thing to cite in uva you must have Class type as Main(M is in capital letter). and there is no tricky part in this problem.


try yourself, before see the code



Friday, September 28, 2018

UVa problem soultion 725 - Division

problem link:

Discuss: this is just simple implementation problem. just simply check every digit using while loop you will get the output.

try yourself, before see the code


Wednesday, September 19, 2018

UVa problem solution 455 - Periodic Strings

problem link:


Discuss: in this problem you can find out longest common sub string using KMP. then trying divide length of string by(length-longest sub) if it's divide than longest sub will be result otherwise there is no result but n.

try yourself, before see the code.

Saturday, September 15, 2018

10298 - Power Strings


10298 - Power Strings

Discuss: this is simple string matching problem. in this problem you have asked to how many reputation you need to make the string. for that i do is create a longest common sequence array. which suffix and also prefix of the string. and if n-l divide n then it can form with this sub string. and the reputation is need n/(n-l). just simple do it.

try yourself,before see the code


Friday, September 14, 2018

10679 - I Love Strings!!

10679 - I Love Strings!!

Discuss: In this problem just simply use KMP pattern searching algorithm. and you will get the result. there  is no tricky part in this problem.
try yourself, before see the code