結果
問題 | No.2175 Exciting Combo |
ユーザー |
👑 |
提出日時 | 2023-01-06 21:21:37 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 1,017 ms |
コンパイル使用メモリ | 26,880 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 17:05:55 |
合計ジャッジ時間 | 692 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <stdio.h>void chmax(int *a, int b){if (*a < b) *a = b;}int main(){int A1, A2, A3, B;scanf("%d %d %d %d", &A1, &A2, &A3, &B);int ans = A1 * 3;chmax(&ans, A2 * 3);chmax(&ans, A3 * 3);chmax(&ans, A1 + A2 + A3 + B);printf("%d\n", ans);fflush(stdout);return 0;}