12 while ((nread
= getline(&line
, &len
, stdin
)) >= 0) {
13 unsigned int min
= -1, max
= 0;
14 char *token
= strtok(line
, " \t");
16 int value
= atoi(token
);
21 token
= strtok(NULL
, " \t");
35 while ((nread
= getline(&line
, &len
, stdin
)) >= 0) {
36 int *array
= calloc(sizeof(int), nread
);
37 char *token
= strtok(line
, " \t");
40 array
[i
++] = atoi(token
);
41 token
= strtok(NULL
, " \t");
43 for (i
= 0; i
< nread
; i
++) {
46 for (j
= 0; j
< nread
; j
++) {
47 if (i
== j
|| !array
[j
])
49 if (!(array
[i
] % array
[j
])) {
50 sum
+= array
[i
] / array
[j
];
51 printf("found %d/%d=%d\n", array
[i
], array
[j
], array
[i
]/array
[j
]);