結果
| 問題 | No.436 ccw |
| コンテスト | |
| ユーザー |
OGNM
|
| 提出日時 | 2016-11-12 23:35:05 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 112 ms / 2,000 ms |
| + 249µs | |
| コード長 | 478 bytes |
| 記録 | |
| コンパイル時間 | 2,286 ms |
| コンパイル使用メモリ | 85,992 KB |
| 実行使用メモリ | 46,220 KB |
| 最終ジャッジ日時 | 2026-09-30 01:23:23 |
| 合計ジャッジ時間 | 5,843 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
import java.util.*;
public class Study_01 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int index = s.indexOf("ccw");
int sL = s.length();
int last = sL - index - 3;
if(index > last){
System.out.println(last + 1);
}else if(last > index){
System.out.println(index + 1);
}else if(index == 0){
System.out.println(1);
}
}
}
OGNM