1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-23 15:48:42 +00:00
202401-programming-assignments/【实践课外】2.选择结构1/7-5 21选择-最短完成时间.c

19 lines
236 B
C
Raw Normal View History

2024-10-18 10:46:44 +00:00
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int ans1 = n * 7;
int ans2 = 15 + n * 5;
if (ans1 < ans2) {
printf("%d\n", ans1);
} else {
printf("%d\n", ans2);
}
return 0;
}