結果
| 問題 |
No.436 ccw
|
| ユーザー |
|
| 提出日時 | 2019-06-08 02:42:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 471 bytes |
| コンパイル時間 | 3,793 ms |
| コンパイル使用メモリ | 74,420 KB |
| 実行使用メモリ | 42,164 KB |
| 最終ジャッジ日時 | 2024-10-05 22:13:57 |
| 合計ジャッジ時間 | 7,039 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 WA * 1 |
ソースコード
import java.util.*;
import java.math.*;
public class No436 {
public static void main(String[] args) {
// 標準入力から読み込む際に、Scannerオブジェクトを使う。
Scanner s = new Scanner(System.in);
String str = s.next();
int b = str.indexOf("ccw");
if(b < str.length() / 2) {
System.out.println(b + 1);
}else {
System.out.println(str.length() - b - 2);
}
}
}