結果

問題 No.150 "良問"(良問とは言っていない
ユーザー roiti46roiti46
提出日時 2015-02-12 23:39:42
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 380 bytes
コンパイル時間 1,565 ms
コンパイル使用メモリ 76,524 KB
実行使用メモリ 78,320 KB
最終ジャッジ日時 2024-04-19 09:13:20
合計ジャッジ時間 4,285 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
77,856 KB
testcase_01 AC 72 ms
75,648 KB
testcase_02 AC 72 ms
75,656 KB
testcase_03 AC 72 ms
75,520 KB
testcase_04 AC 73 ms
75,776 KB
testcase_05 AC 81 ms
77,440 KB
testcase_06 AC 135 ms
77,968 KB
testcase_07 AC 73 ms
75,776 KB
testcase_08 AC 85 ms
77,568 KB
testcase_09 AC 82 ms
77,824 KB
testcase_10 AC 97 ms
77,820 KB
testcase_11 AC 99 ms
77,952 KB
testcase_12 AC 95 ms
77,864 KB
testcase_13 AC 101 ms
77,952 KB
testcase_14 AC 105 ms
77,856 KB
testcase_15 AC 108 ms
78,208 KB
testcase_16 AC 85 ms
77,824 KB
testcase_17 AC 95 ms
77,824 KB
testcase_18 AC 96 ms
78,196 KB
testcase_19 AC 105 ms
78,320 KB
testcase_20 AC 105 ms
77,696 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