Solved 13B in java for 100%, without type overflow