結果

問題 No.150 "良問"(良問とは言っていない
ユーザー pluto77pluto77
提出日時 2016-11-04 09:17:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,339 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-04-19 09:43:51
合計ジャッジ時間 6,909 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 272 ms
6,144 KB
testcase_01 AC 12 ms
6,144 KB
testcase_02 AC 12 ms
6,144 KB
testcase_03 AC 12 ms
6,144 KB
testcase_04 AC 12 ms
6,272 KB
testcase_05 AC 26 ms
6,144 KB
testcase_06 AC 1,339 ms
6,144 KB
testcase_07 AC 10 ms
6,144 KB
testcase_08 AC 17 ms
6,016 KB
testcase_09 AC 13 ms
6,144 KB
testcase_10 AC 305 ms
6,144 KB
testcase_11 AC 353 ms
6,144 KB
testcase_12 AC 228 ms
6,016 KB
testcase_13 AC 320 ms
6,144 KB
testcase_14 AC 416 ms
6,016 KB
testcase_15 AC 408 ms
6,144 KB
testcase_16 AC 43 ms
6,144 KB
testcase_17 AC 122 ms
6,016 KB
testcase_18 AC 372 ms
6,016 KB
testcase_19 AC 459 ms
6,272 KB
testcase_20 AC 482 ms
6,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_150

a='good'
b='problem'
t=int(raw_input())
for r in range(t):
 s=raw_input()
 res=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]!=a[k]: cnt+=1
   for k in range(7):
    if s[j+k]!=b[k]: cnt+=1
   res=min(res,cnt)
 print res
0