結果

問題 No.268 ラッピング(Easy)
ユーザー kentahamakentahama
提出日時 2015-08-21 23:23:09
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 508 bytes
コンパイル時間 895 ms
コンパイル使用メモリ 23,484 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 15:27:17
合計ジャッジ時間 1,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 0 ms
4,380 KB
testcase_02 AC 0 ms
4,376 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 0 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 0 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int length(int L1, int L2, int L3, int R, int B, int Y) {
  return (R * (L2 + L3) + B * (L1 + L3) + Y * (L1 + L2)) * 2;
}

int main(void) {
  int l1, l2, l3;
  int r, b, y;
  int ret, ret0, ret1, ret2;
  
  scanf("%d %d %d %d %d %d", &l1, &l2, &l3, &r, &b, &y);

  ret0 = length(l1, l2, l3, r, b, y);
  ret1 = length(l3, l1, l2, r, b, y);
  ret2 = length(l3, l2, l1, r, b, y);

  ret = ret0;
  if(ret > ret1) ret = ret1;
  if(ret > ret2) ret = ret2;
 
  printf("%d\n", ret);
  return 0;
}
0