#include <stdio.h>
#include <stdlib.h>
#define LINHA_MAX_TAM (100)
typedef struct
{
float weight; // Peso do carro
char name[30]; // Nome do carro
int number; // Número do carro
int power; // Potência do carro
int position; // Posição do carro
} Car;
int main(void)
{
Car car;
char linha[LINHA_MAX_TAM];
while(fgets(linha
, LINHA_MAX_TAM
, stdin
)) {
sscanf( linha
, "%f %s %d %d %d", &car.
weight, car.
name, &car.
number, &car.
power, &car.
position); printf("Peso: %.2f - Nome: %s - Numero: %.2d - Potencia: %d - Posicao: %d\n", car.
weight, car.
name, car.
number, car.
power, car.
position); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCiNkZWZpbmUgTElOSEFfTUFYX1RBTSAgICgxMDApCgp0eXBlZGVmIHN0cnVjdAp7CiAgICBmbG9hdCB3ZWlnaHQ7ICAgICAgIC8vIFBlc28gZG8gY2Fycm8KICAgIGNoYXIgIG5hbWVbMzBdOyAgICAgLy8gTm9tZSBkbyBjYXJybwogICAgaW50IG51bWJlcjsgICAgICAgICAvLyBOw7ptZXJvIGRvIGNhcnJvCiAgICBpbnQgcG93ZXI7ICAgICAgICAgIC8vIFBvdMOqbmNpYSBkbyBjYXJybwogICAgaW50IHBvc2l0aW9uOyAgICAgICAvLyBQb3Npw6fDo28gZG8gY2Fycm8KCn0gQ2FyOwoKaW50IG1haW4odm9pZCkKewogICAgQ2FyIGNhcjsKICAgIGNoYXIgbGluaGFbTElOSEFfTUFYX1RBTV07CgogICAgd2hpbGUoZmdldHMobGluaGEsIExJTkhBX01BWF9UQU0sIHN0ZGluICkpIAogICAgewogICAgICAgIHNzY2FuZiggbGluaGEsICIlZiAlcyAlZCAlZCAlZCIsICZjYXIud2VpZ2h0LCBjYXIubmFtZSwgJmNhci5udW1iZXIsICZjYXIucG93ZXIsICZjYXIucG9zaXRpb24pOwogICAgICAgIHByaW50ZigiUGVzbzogJS4yZiAtIE5vbWU6ICVzIC0gTnVtZXJvOiAlLjJkIC0gUG90ZW5jaWE6ICVkIC0gUG9zaWNhbzogJWRcbiIsIGNhci53ZWlnaHQsIGNhci5uYW1lLCBjYXIubnVtYmVyLCBjYXIucG93ZXIsIGNhci5wb3NpdGlvbik7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0=
NzI4Ljc4IEZlcnJhcmkgMDUgMTA1MCA4CjcyMi4wMCBXaWxsaWFtcyAxOSA5NTAgMgo3MjguODcgTWNMYXJlbiAxNCA3NTAgOQo3MjIuMzIgUmVuYXVsdCAyNyA5MzAgMTQKNjk4LjkyIFJlZEJ1bGwgMDMgOTIwIDUKNzI3LjU2IFRvcm9Sb3NvIDI2IDEwMDAgMTIKNzE4LjU1IEhhYXMgMDggOTYwIDcKNzI4LjAxIE1lcmNlZGVzIDc3IDk1MCAxCjcyOC42NSBGZXJyYXJpIDA3IDEwNTAgMwo3MjIuMTEgUmVuYXVsdCAzMCA5MzAgMTAKNzI4LjUwIFNhdWJlciA5NCAxMDAwIDExCjcyOC4zOSBNZXJjZWRlcyA0NCA5NTAgNiAKNzI4LjIyIE1jTGFyZW4gMDIgNzUwIDEzCjcyMi43NiBXaWxsaWFtcyAxOCA5NTAgNAo3MDAuMDEgUmVkQnVsbCAzMyA5MjAgMTU=
728.78 Ferrari 05 1050 8
722.00 Williams 19 950 2
728.87 McLaren 14 750 9
722.32 Renault 27 930 14
698.92 RedBull 03 920 5
727.56 ToroRoso 26 1000 12
718.55 Haas 08 960 7
728.01 Mercedes 77 950 1
728.65 Ferrari 07 1050 3
722.11 Renault 30 930 10
728.50 Sauber 94 1000 11
728.39 Mercedes 44 950 6
728.22 McLaren 02 750 13
722.76 Williams 18 950 4
700.01 RedBull 33 920 15