Search found 5 matches
- Fri Dec 21, 2007 6:36 am
- Forum: Volume 6 (600-699)
- Topic: 624 - CD
- Replies: 77
- Views: 35168
Sample Input 5 3 1 3 4 10 4 9 8 4 2 20 4 10 5 7 4 90 8 10 23 1 2 3 4 5 7 45 8 4 10 44 43 12 9 8 2 Sample Output 1 4 sum:5 8 2 sum:10 10 5 4 sum:19 10 23 1 2 3 4 5 7 sum:55 4 10 12 9 8 2 sum:45 that was straight from the site , the output should be sorted right? because the sample output isnt sorted...
- Wed Nov 21, 2007 8:16 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 208795
- Wed Nov 21, 2007 8:08 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 208795
- Wed Nov 21, 2007 6:37 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 208795
thanks for the reply, and so we could use .hasNext() method to check if the input is finished? I'm not sure why i get a WA then for the problem 100, i took care of the i>j or i<j and still... /* problem 100 * 3n + 1 problem */ import java.util.*; class Main { public static void main(String[] args) {...
- Tue Nov 20, 2007 11:35 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 208795
Q: java input
can anyone explain how does the java input provided works?
why cant we use Scanner? for some problems, how do we tell if the input is over? do we use Scanner.hasNext() method?
thanks for any "input"
why cant we use Scanner? for some problems, how do we tell if the input is over? do we use Scanner.hasNext() method?
thanks for any "input"
