We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- HourRank 28
- Clock Delay
- Discussions
Clock Delay
Clock Delay
Sort by
recency
|
10 Discussions
|
Please Login in order to post a comment
Trivial but please fix. The clock is leading not lagging. Had me confused there at the first look.
can you please explain
private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args) throws IOException { BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); int arrCount = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])"); int[] arr = new int[arrCount]; for (int arrItr = 0; arrItr < arrCount; arrItr++) { int arrItem = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])"); arr[arrItr] = arrItem; } int k = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])*"); String res = findNumber(arr, k); bufferedWriter.write(res); bufferedWriter.newLine(); bufferedWriter.close(); scanner.close(); } }
My solution in plain C