結果

問題 No.27 板の準備
ユーザー pluto77pluto77
提出日時 2016-10-09 09:51:16
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 213 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 77,852 KB
実行使用メモリ 79,736 KB
最終ジャッジ日時 2023-08-27 04:36:55
合計ジャッジ時間 4,562 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
79,216 KB
testcase_01 AC 132 ms
79,240 KB
testcase_02 AC 184 ms
79,184 KB
testcase_03 AC 139 ms
79,736 KB
testcase_04 AC 191 ms
79,324 KB
testcase_05 AC 188 ms
79,208 KB
testcase_06 AC 195 ms
79,320 KB
testcase_07 AC 198 ms
79,276 KB
testcase_08 AC 213 ms
79,412 KB
testcase_09 AC 199 ms
79,352 KB
testcase_10 AC 192 ms
79,184 KB
testcase_11 AC 196 ms
79,508 KB
testcase_12 AC 192 ms
79,356 KB
testcase_13 AC 180 ms
79,532 KB
testcase_14 AC 184 ms
79,212 KB
testcase_15 AC 196 ms
79,360 KB
testcase_16 AC 138 ms
79,376 KB
testcase_17 AC 199 ms
79,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_27

INF=1000
v=map(int,raw_input().split())
res=INF
for a in xrange(1,31):
 for b in xrange(1,31):
  for c in xrange(1,31):
   temp=0
   for x in v:
    rtemp=INF
    for i in xrange(31):
     for j in xrange(31):
      k=x-i*a-j*b
      if k<0:
       break
      if k%c==0:
       rtemp=min(rtemp,i+j+k/c)
    temp+=rtemp
   res=min(res,temp)
print res
0