int main(void) { int t; scanf("%d\n", &t); while (t-- > 0) { int godzilla_army_count, mechagodzilla_army_count; int godzilla_army_champion, mechagodzilla_army_champion; scanf("%d %d\n", &godzilla_army_count, &mechagodzilla_army_count); godzilla_army_champion = find_champion(godzilla_army_count); mechagodzilla_army_champion = find_champion(mechagodzilla_army_count); // printf("\tgodzilla_army_champion=%d\tmechagodzilla_army_champion=%d\n", godzilla_army_champion, mechagodzilla_army_champion); if (mechagodzilla_army_champion > godzilla_army_champion) { printf("MechaGodzilla\n"); } else { printf("Godzilla\n"); } } return 0; }
t_champion *find_champion(t_list *elem, int actual, int n) { if (elem == NULL) return (NULL); if (actual == n) return (elem->content); else return (find_champion(elem->next, actual + 1, n)); }