#include <stdio.h>
int main(void) {
long max;
long min;
long idx;
long nums[10];
long cnt;
long num;
cnt = 0;
while (1) {
if (num < 0) {
break;
}
nums[cnt] = num;
cnt++;
}
max = 0;
min = 0;
for (idx = 1; idx < cnt; idx++) {
if (nums[max] < nums[idx]) {
max = idx;
} else if (nums[idx] < nums[min]) {
min = idx;
}
}
for (idx = 0; idx < cnt; idx++) {
printf("%d:%3d", idx
+ 1, nums
[idx
]); if (idx == max) {
}
if (idx == min) {
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7Cglsb25nIG1heDsKCWxvbmcgbWluOwoJbG9uZyBpZHg7Cglsb25nIG51bXNbMTBdOwoJbG9uZyBjbnQ7Cglsb25nIG51bTsKCQoJY250ID0gMDsKCXdoaWxlICgxKSB7CgkJcHJpbnRmKCLlgKQlZDoiLCBjbnQgKyAxKTsKCQlzY2FuZigiJWxkIiwgJm51bSk7CgkJaWYgKG51bSA8IDApIHsKCQkJYnJlYWs7CgkJfQoJCW51bXNbY250XSA9IG51bTsKCQljbnQrKzsKCX0KCQoJbWF4ID0gMDsKCW1pbiA9IDA7Cglmb3IgKGlkeCA9IDE7IGlkeCA8IGNudDsgaWR4KyspIHsKCQlpZiAobnVtc1ttYXhdIDwgbnVtc1tpZHhdKSB7CgkJCW1heCA9IGlkeDsKCQl9IGVsc2UgaWYgKG51bXNbaWR4XSA8IG51bXNbbWluXSkgewoJCQltaW4gPSBpZHg7CgkJfQoJfQoJCglmb3IgKGlkeCA9IDA7IGlkeCA8IGNudDsgaWR4KyspIHsKCQlwcmludGYoIiVkOiUzZCIsIGlkeCArIDEsIG51bXNbaWR4XSk7CgkJaWYgKGlkeCA9PSBtYXgpIHsKCQkJcHJpbnRmKCIgIG1heCIpOwoJCX0KCQlpZiAoaWR4ID09IG1pbikgewoJCQlwcmludGYoIiAgbWluIik7CgkJfQoJCXByaW50ZigiXG4iKTsKCX0KCQoJcmV0dXJuIDA7Cn0=