Ivan Franko

Ranch Hand
+ Follow
since May 30, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
17
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ivan Franko

Tim Cooke wrote:

Ivan Franko wrote:Which site you are using instead of JavaBlackBelt?


For what?



java quizzes.
6 years ago
As all know, JavaBlackBelt is died long time ago.
Which site you are using instead of JavaBlackBelt?
6 years ago
Yep, It is 10 x18. I don't know how insert superscript in the post message.
9 years ago
If you want see three random letter characters and three random number characters, why didn't you print them?

Array license contains your expected values. Print it.
9 years ago

Why are you using a Long?


Because: digit between 0 ≤ A ≤ 10X18, but Integer.MAX_VALUE=2147483647

Why are you putting Longs into a List?


Because I dont know how much digits came from input string. In this case where can I save any number od digits? In array? But How?

Why have you got a byte[]?


Sorry?
9 years ago
I uploaded code on http://acm.timus.ru/. On this server code was successfully executed and passed through couple tests. All happened automatically.
9 years ago
Sorry, could you please provide Actual and Expected results?
9 years ago
Condition:


Input
The input stream contains a set of integer numbers Ai (0 ≤ Ai ≤ 1018). The numbers are separated by any number of spaces and line breaks. A size of the input stream does not exceed 256 KB.
Output
For each number Ai from the last one till the first one you should output its square root. Each square root should be printed in a separate line with at least four digits after decimal point.



Sample:


input:
1427 0

876652098643267843
5276538

output:
2297.0716
936297014.1164
0.0000
37.7757



My code below:


Judgement result:
Accepted

So, my first goal was successfully completed - I found solution for this exercise.
but, currently, I think about other point: code quality.
I would like reach high code quality level.

What do you think, this code is ok? Because, I am not sure, that my solution with processing InputStream is really cool.
Could you please suggest any improvements if it is need.
9 years ago
to Wesleigh Pieters: cool!
9 years ago
I can do it. but I am afraid, that after this Campbell Ritchie kill me..
9 years ago
but each method contains javadoc, and each javadoc section contains information about "throws Exceptions"

For example:


executeQuery

public ResultSet executeQuery(String sql)
throws SQLException
Executes the given SQL statement, which returns a single ResultSet object.
Parameters:
sql - an SQL statement to be sent to the database, typically a static SQL SELECT statement
Returns:
a ResultSet object that contains the data produced by the given query; never null
Throws:
SQLException - if a database access error occurs or the given SQL statement produces anything other than a single ResultSet object

Because, it is checked Exception.
but this is 9! results. (9*8*7*6*5*4*3*2=362880)

Is it ok?
9 years ago
After each step, you don't change coordinates, why?

I think it is a root of the issue.
9 years ago

bob jenkins wrote:I'm using xcode on mac to do the program and then running it on terminal.

Okay i get you now.
An yes i was running it like this: c:>java TestHomework

Is there any way i can make it so when i run it it will ask me what i put like "What is the name of the shuffled deck file? " and then enter the name of the file
instead if putting it along with the java TestHomework?



Of course you can do it. Take a look at this link, please: webpage
9 years ago