| Task: | ID |
| Sender: | michaeljackson123 |
| Submission time: | 2016-09-06 18:10:51 +0300 |
| Language: | Java |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.10 s | details |
| #2 | WRONG ANSWER | 0.10 s | details |
| #3 | WRONG ANSWER | 0.13 s | details |
| #4 | WRONG ANSWER | 0.09 s | details |
| #5 | WRONG ANSWER | 0.10 s | details |
| #6 | WRONG ANSWER | 0.10 s | details |
| #7 | WRONG ANSWER | 0.10 s | details |
| #8 | WRONG ANSWER | 0.10 s | details |
| #9 | WRONG ANSWER | 0.11 s | details |
| #10 | WRONG ANSWER | 0.10 s | details |
| #11 | WRONG ANSWER | 0.11 s | details |
| #12 | WRONG ANSWER | 0.10 s | details |
| #13 | WRONG ANSWER | 0.10 s | details |
| #14 | WRONG ANSWER | 0.10 s | details |
| #15 | WRONG ANSWER | 0.09 s | details |
Code
import java.util.Scanner;
/**
*
* @author tuukkatu
*/
public class JavaApplication1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
IO io = new IO();
String stones = io.next();
int counter = 0;
int pointer1 = 0;
int pointer2 = 1;
while (pointer2 < stones.length())
{
if (stones.charAt(pointer2) == stones.charAt(pointer1))
{
pointer1++;
pointer2++;
counter++;
}
else
{
pointer1++;
pointer2++;
}
}
io.println(counter);
io.close();
}
}
Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 1 |
| correct output |
|---|
| 0000000000 |
| user output |
|---|
| 0 |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 2 |
| correct output |
|---|
| 0000000011 |
| user output |
|---|
| 0 |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 1024 |
| correct output |
|---|
| 0000014072 |
| user output |
|---|
| 0 |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 989 |
| correct output |
|---|
| 0000013543 |
| user output |
|---|
| 0 |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 197 |
| correct output |
|---|
| 0000002507 |
| user output |
|---|
| 0 |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 328 |
| correct output |
|---|
| 0000004271 |
| user output |
|---|
| 0 |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 967 |
| correct output |
|---|
| 0000013301 |
| user output |
|---|
| 0 |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 130 |
| correct output |
|---|
| 0000001616 |
| user output |
|---|
| 0 |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 170 |
| correct output |
|---|
| 0000002211 |
| user output |
|---|
| 0 |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 455 |
| correct output |
|---|
| 0000005984 |
| user output |
|---|
| 1 |
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 100 |
| correct output |
|---|
| 0000001230 |
| user output |
|---|
| 1 |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 104 |
| correct output |
|---|
| 0000001274 |
| user output |
|---|
| 0 |
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 415 |
| correct output |
|---|
| 0000005423 |
| user output |
|---|
| 0 |
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 676 |
| correct output |
|---|
| 0000009393 |
| user output |
|---|
| 0 |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 455 |
| correct output |
|---|
| 0000005984 |
| user output |
|---|
| 1 |
