Submission #00058


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.io.*;
import java.util.*;
class Main{
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
int ans[] = new int[1000];
int count = 0;
while(true){
int n = cin.nextInt();
if(n==0)break;
String word[] = new String[n];
for(int i=0;i<n;i++){
word[i] = cin.next();
}
for(int i=0;i<n;i++){
int judge = 0;
for(int j=i;j<n;j++){
judge += word[j].length();
if(judge>=31)break;
}
if(judge==31){
System.out.println(i+1);
ans[count] = i+1;
count ++;
break;
}
}
}
for(int i=0;i<count;i++){
System.out.println(ans[i]);
}
}
}

ステータス

項目 データ
問題 0002 - 短句
ユーザー名 ei1419
投稿日時 2016-03-30 14:17:59
言語 Java
状態 Wrong Answer
得点 0
ソースコード長 681 Byte
最大実行時間 146 ms
最大メモリ使用量 15272 KB

セット

セット 得点 Cases
1 ALL 0 / 15 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
B1 WA 146 ms 15272 KB
1
B2 WA 79 ms 15000 KB
1
B3 WA 77 ms 15040 KB
1
B4 WA 73 ms 14888 KB
1