結果

問題 No.2175 Exciting Combo
ユーザー chro_96chro_96
提出日時 2023-01-06 21:24:00
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 28,032 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 17:09:40
合計ジャッジ時間 695 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main () {
  int a[3] = {};
  int b = 0;
  
  int res = 0;
  
  int ans = 0;
  
  res = scanf("%d", a);
  res = scanf("%d", a+1);
  res = scanf("%d", a+2);
  res = scanf("%d", &b);
  
  ans = a[0]+a[1]+a[2]+b;
  if (a[2]*3 > ans) {
    ans = a[2]*3;
  }
  
  printf("%d\n", ans);
  return 0;
}
0