結果

問題 No.150 "良問"(良問とは言っていない
ユーザー roiti46roiti46
提出日時 2015-02-12 23:39:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,383 ms / 5,000 ms
コード長 380 bytes
コンパイル時間 790 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-19 09:13:08
合計ジャッジ時間 6,891 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 277 ms
6,812 KB
testcase_01 AC 11 ms
6,944 KB
testcase_02 AC 11 ms
6,940 KB
testcase_03 AC 11 ms
6,940 KB
testcase_04 AC 11 ms
6,940 KB
testcase_05 AC 25 ms
6,944 KB
testcase_06 AC 1,383 ms
6,944 KB
testcase_07 AC 11 ms
6,940 KB
testcase_08 AC 16 ms
6,940 KB
testcase_09 AC 12 ms
6,944 KB
testcase_10 AC 316 ms
6,944 KB
testcase_11 AC 358 ms
6,940 KB
testcase_12 AC 238 ms
6,944 KB
testcase_13 AC 337 ms
6,940 KB
testcase_14 AC 431 ms
6,940 KB
testcase_15 AC 415 ms
6,944 KB
testcase_16 AC 40 ms
6,940 KB
testcase_17 AC 126 ms
6,944 KB
testcase_18 AC 385 ms
6,944 KB
testcase_19 AC 474 ms
6,940 KB
testcase_20 AC 498 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(raw_input())
for loop in xrange(T):
    S = raw_input()
    ans = 12
    for i in range(len(S)-10):
        for j in range(i+4,len(S)-6):
            cnt = 0
            for k in range(4):
                if S[i+k] != "good"[k]: cnt += 1
            for k in range(7):
                if S[j+k] != "problem"[k]: cnt += 1
            ans = min(ans, cnt)
    print ans
    
0