Submission #1413128
Source Code Expand
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int N=sc.nextInt(); sc=new Scanner(System.in); String str=sc.next(); int countMizutamari=0; int counter=0; for(int i=0;i<str.length();i++){ if(str.charAt(i)=='X'){ counter++; if(counter==3){ countMizutamari++; counter=0; } }else{ counter=0; } } System.out.println(countMizutamari); } }
Submission Info
Submission Time | |
---|---|
Task | B - 雨上がり |
User | natsukoam |
Language | Java7 (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 682 Byte |
Status | RE |
Exec Time | 101 ms |
Memory | 22740 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 50 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | case_000.txt, case_001.txt, case_002.txt, case_003.txt, case_004.txt, case_005.txt, case_006.txt, case_007.txt, case_008.txt, case_009.txt, case_010.txt, case_011.txt, case_012.txt, case_013.txt, case_014.txt, case_015.txt, case_016.txt, case_017.txt, case_018.txt, case_019.txt, case_020.txt, case_021.txt, case_022.txt, case_023.txt, case_024.txt, case_025.txt, case_026.txt, case_027.txt, case_028.txt, case_029.txt, case_030.txt, case_031.txt, case_032.txt, case_033.txt, case_034.txt, case_035.txt, case_036.txt, case_037.txt, case_038.txt, case_039.txt, case_040.txt, case_041.txt, case_042.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
case_000.txt | RE | 101 ms | 18900 KB |
case_001.txt | RE | 97 ms | 19028 KB |
case_002.txt | RE | 100 ms | 20692 KB |
case_003.txt | RE | 95 ms | 18900 KB |
case_004.txt | RE | 95 ms | 18900 KB |
case_005.txt | RE | 94 ms | 18772 KB |
case_006.txt | RE | 95 ms | 20948 KB |
case_007.txt | RE | 95 ms | 19028 KB |
case_008.txt | RE | 98 ms | 18772 KB |
case_009.txt | RE | 95 ms | 18772 KB |
case_010.txt | RE | 95 ms | 20820 KB |
case_011.txt | RE | 95 ms | 18900 KB |
case_012.txt | RE | 95 ms | 18772 KB |
case_013.txt | RE | 95 ms | 18772 KB |
case_014.txt | RE | 96 ms | 18772 KB |
case_015.txt | RE | 96 ms | 20820 KB |
case_016.txt | RE | 94 ms | 18900 KB |
case_017.txt | RE | 95 ms | 18900 KB |
case_018.txt | RE | 95 ms | 16980 KB |
case_019.txt | RE | 99 ms | 18900 KB |
case_020.txt | RE | 96 ms | 20820 KB |
case_021.txt | RE | 95 ms | 20820 KB |
case_022.txt | RE | 97 ms | 22740 KB |
case_023.txt | RE | 97 ms | 18772 KB |
case_024.txt | RE | 95 ms | 18772 KB |
case_025.txt | RE | 95 ms | 20820 KB |
case_026.txt | RE | 95 ms | 20948 KB |
case_027.txt | RE | 95 ms | 20436 KB |
case_028.txt | RE | 96 ms | 20948 KB |
case_029.txt | RE | 96 ms | 20948 KB |
case_030.txt | RE | 97 ms | 20692 KB |
case_031.txt | RE | 95 ms | 18772 KB |
case_032.txt | RE | 94 ms | 18900 KB |
case_033.txt | RE | 95 ms | 19028 KB |
case_034.txt | RE | 95 ms | 18772 KB |
case_035.txt | RE | 101 ms | 20820 KB |
case_036.txt | RE | 95 ms | 18772 KB |
case_037.txt | RE | 95 ms | 18900 KB |
case_038.txt | RE | 94 ms | 18772 KB |
case_039.txt | RE | 96 ms | 16980 KB |
case_040.txt | RE | 94 ms | 18772 KB |
case_041.txt | RE | 95 ms | 18772 KB |
case_042.txt | RE | 94 ms | 18900 KB |