| Task: | Bittijono |
| Sender: | sp |
| Submission time: | 2016-10-09 01:49:22 +0300 |
| Language: | Java |
| Status: | READY |
| Result: | 10 |
| group | verdict | score |
|---|---|---|
| #1 | ACCEPTED | 10 |
| #2 | RUNTIME ERROR | 0 |
| #3 | RUNTIME ERROR | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.17 s | 1 | details |
| #2 | RUNTIME ERROR | 0.55 s | 2 | details |
| #3 | RUNTIME ERROR | 0.15 s | 3 | details |
Code
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.Scanner;
/**
*
* @author Miro Petsalo
*/
public class Sandbox {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String p = "01101001100101101001011001101001100101100110100101101001100101101001011001101001011010011001011001101001100101101001011001101001";
int amount = s.nextInt();
int[] n = new int[10000000];
int x = 0;
while(amount>0){
n[x] = s.nextInt()-1;
x++;
amount=amount-1;
}
int c = 0;
int c1=0;
while(x>0){
int cm = 0;
System.out.println(p.charAt(n[c]));
x--;
c++;
}
// se toinen juttu
}
}
Test details
Test 1
Group: 1
Verdict: ACCEPTED
| input |
|---|
| 100 62 9 12 73 ... |
| correct output |
|---|
| 1 1 1 0 1 ... |
| user output |
|---|
| 1 1 1 0 1 ... |
Test 2
Group: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 100000 565433 141881 120108 825392 ... |
| correct output |
|---|
| 1 1 0 0 1 ... |
| user output |
|---|
| (empty) |
Error:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 565432 at java.lang.String.charAt(String.java:658) at Sandbox.main(Sandbox.java:44)
Test 3
Group: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 100000 374768524402011755 937067109466254318 389256426086302899 932585725667010169 ... |
| correct output |
|---|
| 0 1 1 1 1 ... |
| user output |
|---|
| (empty) |
Error:
Exception in thread "main" java.util.InputMismatchException: For input string: "374768524402011755" at java.util.Scanner.nextInt(Scanner.java:2123) at java.util.Scanner.nextInt(Scanner.java:2076) at Sandbox.main(Sandbox.java:30)
