結果

問題 No.345 最小チワワ問題
ユーザー 重荷重荷
提出日時 2016-03-17 11:14:50
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 32,540 KB
実行使用メモリ 32,668 KB
最終ジャッジ日時 2024-04-08 16:42:03
合計ジャッジ時間 2,650 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
32,540 KB
testcase_01 AC 48 ms
32,544 KB
testcase_02 AC 47 ms
32,540 KB
testcase_03 AC 44 ms
32,540 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 43 ms
32,540 KB
testcase_08 AC 43 ms
32,540 KB
testcase_09 AC 43 ms
32,540 KB
testcase_10 AC 46 ms
32,540 KB
testcase_11 AC 43 ms
32,540 KB
testcase_12 AC 43 ms
32,540 KB
testcase_13 AC 43 ms
32,540 KB
testcase_14 WA -
testcase_15 AC 43 ms
32,540 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 43 ms
32,540 KB
testcase_20 AC 43 ms
32,540 KB
testcase_21 AC 44 ms
32,540 KB
testcase_22 AC 43 ms
32,540 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 43 ms
32,540 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 43 ms
32,540 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$cStr = trim(fgets(STDIN));
$result = strpos($cStr,'c');
if(strpos($cStr,'c') !== false  && 
    strpos($cStr,'w',strpos($cStr,'c')) !== false && 
        strpos($cStr,'w',strpos($cStr,'w',strpos($cStr,'c'))+1) !== false){
    $ans = strpos($cStr,'w',strpos($cStr,'w',strpos($cStr,'c'))+1) - strpos($cStr,'c')+1;
    printf("$ans");
}else{
    printf("-1");
}
0