Some strange behavior ( unlimited response time ) with processing tasks 18 and 19

Back to Problem Solutions forum

shatseli     2020-02-01 21:31:12

Dear Admin ! ( Hi Rodion less officially ;-) ) Thank you very much for the challenges provided by those tasks ( Unexpectably it took me a lot of efforts :-) ) But I want to put your attention on very unuasual and strange behavior this time: Upon clicking on Submit button the responce time greatly exceed the 20 seconds promised and a output field was filled with an unlimited amount of dots... To validate the results I had to open the IDEONE site then put my code there and input data from CodeAbbey site. Dear Rodionplease kindly advice what I did wrong or pls. check what may be the reason of this exceeding response time and how it is possible to overcome it ? Have a nice week ! Eli

Rodion (admin)     2020-02-04 06:07:51
User avatar

Hi Eli! Glad to hear from you! :)

I'm a bit confused by you mentioning "submit":

Upon clicking on Submit button

probably it was meant you are clicking Java button to run solution and get results in the Answer field?

If it is so, then most probably it was a temporary malfunction of 3rd party service which helps us running solutions.

It is provided by famous Hackerrank website for free, but sometimes it is broken for several hours :(

Sorry for inconvenience and slow response (from me, not server, ha-ha)!

Quite enjoyed to see your steady progress by the way! It looks like you are going to achieve new rank soon! :)

Radovan Markus     2020-02-04 20:43:02
User avatar

Speaking of "strange behaviour" I recieved this kind of error when I clicked compile with "java"

"Note: PrimeRanges.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details." (So I ran solution on my computer)

While doing prime ranges and I am not really sure why. I had some troubles doing this task (what a simple task was my first tought) well it actually was but I encountered many unexpected problems (for which I actually left comments) maybe my code was just that bad, or could it be server side problem?

Rodion (admin)     2020-02-04 20:51:59
User avatar

Radovan, Hi!

probably this is worth dedicated topic as it is completely separate thing, and somewhat important for beginners in java - but let it be here for now :)

Java is strictly-typed language, which means it tries to maniacally watch you are doing correct type conversions wherever compiler can it check. This helps in large projects both for bug-prevention and for refactoring.

Still due to legacy reasons it is possible to write some expressions which break notion of types (usually with complex types) - and compiler gives this warning.

As it says, you can recompile with the given command line parameter to find out what line is causing problem :)

Just don't hesitate to do what compiler suggests! It may teach some good :)

Please login and solve 5 problems to be able to post at forum