2022-03-17 13:02:02 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(){
|
2022-03-17 15:35:56 +00:00
|
|
|
int c, result;
|
|
|
|
int value = 0;
|
2022-03-17 15:02:06 +00:00
|
|
|
int vxod[999];
|
2022-03-17 15:35:56 +00:00
|
|
|
int a = 0;
|
|
|
|
for(int i = 0; i < 4; i++){
|
|
|
|
c = scanf("%d",&value);;
|
2022-03-17 15:02:06 +00:00
|
|
|
vxod[i] = c;
|
2022-03-17 15:35:56 +00:00
|
|
|
a = i;
|
2022-03-17 15:02:06 +00:00
|
|
|
}
|
2022-03-17 15:35:56 +00:00
|
|
|
value = 0;
|
2022-03-17 15:37:12 +00:00
|
|
|
results = vxod[0];
|
2022-03-17 15:35:56 +00:00
|
|
|
do{
|
2022-03-17 15:37:12 +00:00
|
|
|
result = results * vxod[value] + 1;
|
2022-03-17 15:35:56 +00:00
|
|
|
value++;
|
|
|
|
}while(value < a);
|
|
|
|
printf("%d\n", result);
|
2022-03-17 13:02:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|