A - ABC Preparation Editorial by en_translator


The answer is the minimum value of \(A_1, A_2, A_3\) and \(A_4\).

Sample Code (C)

#include <stdio.h>

int main() {
	int a1, a2, a3, a4;
	scanf("%d%d%d%d", &a1, &a2, &a3, &a4);
	int res = a1;
	if (res > a2) res = a2;
	if (res > a3) res = a3;
	if (res > a4) res = a4;
	printf("%d\n", res);
	return 0;
}

Sample Code (Python)

print(min(map(int, input().split())))

posted:
last update: