Pareces más joven X13786


Statement
 

pdf   zip

html

Escrivid un programa que lea lineas. En cada linea de entrada, alguien dice que edad tiene. Como respuesta, el programa tiene que decir que este alguien parece más joven e indicar una edad menor.

Para edades entre 10 y 19 años, el programa indicará exactamente 1 año menos.

Para edades entre 20 y 29 años, el programa indicará exactamente 2 años menos.

Para edades entre 30 y 39 años, el programa indicará exactamente 3 años menos.

Y así sucesivamente.

Seguid el formato de los ejemplos.

Entrada

Cada linea de la entrada es de la forma:

My name is NAME and I am N years old.

Donde NAME es un string no vacío sin espacios y N es un natural mayor o igual a 10.

Salida

Para cada caso de entrada, la salida contiene una linea de la forma:

NAME, you look younger. I thought you were M years old.

Donde NAME es el mismo string de la entrada, i M se obtiene a partir de N restando un número, que será 1 si N está entre 10 i 19, o 2 si N está entre 20 i 29, o 3 si N está entre 30 i 39, i así sucesivamente.

Public test cases
  • Input

    My name is Joe and I am 10 years old.
    My name is Julia and I am 15 years old.
    My name is Maria and I am 19 years old.
    My name is George and I am 20 years old.
    My name is Brutus and I am 30 years old.
    My name is Goldfinger and I am 100 years old.
    My name is JuliusCaesar and I am 2123 years old.
    My name is Earth and I am 2000000000 years old.

    Output

    Joe, you look younger. I thought you were 9 years old.
    Julia, you look younger. I thought you were 14 years old.
    Maria, you look younger. I thought you were 18 years old.
    George, you look younger. I thought you were 18 years old.
    Brutus, you look younger. I thought you were 27 years old.
    Goldfinger, you look younger. I thought you were 90 years old.
    JuliusCaesar, you look younger. I thought you were 1911 years old.
    Earth, you look younger. I thought you were 1800000000 years old.
    
  • Input

    My name is NAME10 and I am 10 years old.
    My name is NAME11 and I am 11 years old.
    My name is NAME12 and I am 12 years old.
    My name is NAME13 and I am 13 years old.
    My name is NAME14 and I am 14 years old.
    My name is NAME15 and I am 15 years old.
    My name is NAME16 and I am 16 years old.
    My name is NAME17 and I am 17 years old.
    My name is NAME18 and I am 18 years old.
    My name is NAME19 and I am 19 years old.
    My name is NAME20 and I am 20 years old.
    My name is NAME21 and I am 21 years old.
    My name is NAME22 and I am 22 years old.
    My name is NAME23 and I am 23 years old.
    My name is NAME24 and I am 24 years old.
    My name is NAME25 and I am 25 years old.
    My name is NAME26 and I am 26 years old.
    My name is NAME27 and I am 27 years old.
    My name is NAME28 and I am 28 years old.
    My name is NAME29 and I am 29 years old.
    My name is NAME30 and I am 30 years old.
    My name is NAME31 and I am 31 years old.
    My name is NAME32 and I am 32 years old.
    My name is NAME33 and I am 33 years old.
    My name is NAME34 and I am 34 years old.
    My name is NAME35 and I am 35 years old.
    My name is NAME36 and I am 36 years old.
    My name is NAME37 and I am 37 years old.
    My name is NAME38 and I am 38 years old.
    My name is NAME39 and I am 39 years old.
    My name is NAME40 and I am 40 years old.
    My name is NAME41 and I am 41 years old.
    My name is NAME42 and I am 42 years old.
    My name is NAME43 and I am 43 years old.
    My name is NAME44 and I am 44 years old.
    My name is NAME45 and I am 45 years old.
    My name is NAME46 and I am 46 years old.
    My name is NAME47 and I am 47 years old.
    My name is NAME48 and I am 48 years old.
    My name is NAME49 and I am 49 years old.
    My name is NAME50 and I am 50 years old.
    My name is NAME51 and I am 51 years old.
    My name is NAME52 and I am 52 years old.
    My name is NAME53 and I am 53 years old.
    My name is NAME54 and I am 54 years old.
    My name is NAME55 and I am 55 years old.
    My name is NAME56 and I am 56 years old.
    My name is NAME57 and I am 57 years old.
    My name is NAME58 and I am 58 years old.
    My name is NAME59 and I am 59 years old.
    My name is NAME60 and I am 60 years old.
    My name is NAME61 and I am 61 years old.
    My name is NAME62 and I am 62 years old.
    My name is NAME63 and I am 63 years old.
    My name is NAME64 and I am 64 years old.
    My name is NAME65 and I am 65 years old.
    My name is NAME66 and I am 66 years old.
    My name is NAME67 and I am 67 years old.
    My name is NAME68 and I am 68 years old.
    My name is NAME69 and I am 69 years old.
    My name is NAME70 and I am 70 years old.
    My name is NAME71 and I am 71 years old.
    My name is NAME72 and I am 72 years old.
    My name is NAME73 and I am 73 years old.
    My name is NAME74 and I am 74 years old.
    My name is NAME75 and I am 75 years old.
    My name is NAME76 and I am 76 years old.
    My name is NAME77 and I am 77 years old.
    My name is NAME78 and I am 78 years old.
    My name is NAME79 and I am 79 years old.
    My name is NAME80 and I am 80 years old.
    My name is NAME81 and I am 81 years old.
    My name is NAME82 and I am 82 years old.
    My name is NAME83 and I am 83 years old.
    My name is NAME84 and I am 84 years old.
    My name is NAME85 and I am 85 years old.
    My name is NAME86 and I am 86 years old.
    My name is NAME87 and I am 87 years old.
    My name is NAME88 and I am 88 years old.
    My name is NAME89 and I am 89 years old.
    My name is NAME90 and I am 90 years old.
    My name is NAME91 and I am 91 years old.
    My name is NAME92 and I am 92 years old.
    My name is NAME93 and I am 93 years old.
    My name is NAME94 and I am 94 years old.
    My name is NAME95 and I am 95 years old.
    My name is NAME96 and I am 96 years old.
    My name is NAME97 and I am 97 years old.
    My name is NAME98 and I am 98 years old.
    My name is NAME99 and I am 99 years old.
    My name is NAME100 and I am 100 years old.
    My name is NAME101 and I am 101 years old.
    My name is NAME102 and I am 102 years old.
    My name is NAME103 and I am 103 years old.
    My name is NAME104 and I am 104 years old.
    My name is NAME105 and I am 105 years old.
    My name is NAME106 and I am 106 years old.
    My name is NAME107 and I am 107 years old.
    My name is NAME108 and I am 108 years old.
    My name is NAME109 and I am 109 years old.
    My name is NAME110 and I am 110 years old.
    My name is NAME111 and I am 111 years old.
    My name is NAME112 and I am 112 years old.
    My name is NAME113 and I am 113 years old.
    My name is NAME114 and I am 114 years old.
    My name is NAME115 and I am 115 years old.
    My name is NAME116 and I am 116 years old.
    My name is NAME117 and I am 117 years old.
    My name is NAME118 and I am 118 years old.
    My name is NAME119 and I am 119 years old.
    My name is NAME120 and I am 120 years old.
    My name is NAME121 and I am 121 years old.
    My name is NAME122 and I am 122 years old.
    My name is NAME123 and I am 123 years old.
    My name is NAME124 and I am 124 years old.
    My name is NAME125 and I am 125 years old.
    My name is NAME126 and I am 126 years old.
    My name is NAME127 and I am 127 years old.
    My name is NAME128 and I am 128 years old.
    My name is NAME129 and I am 129 years old.
    My name is NAME130 and I am 130 years old.
    My name is NAME131 and I am 131 years old.
    My name is NAME132 and I am 132 years old.
    My name is NAME133 and I am 133 years old.
    My name is NAME134 and I am 134 years old.
    My name is NAME135 and I am 135 years old.
    My name is NAME136 and I am 136 years old.
    My name is NAME137 and I am 137 years old.
    My name is NAME138 and I am 138 years old.
    My name is NAME139 and I am 139 years old.
    My name is NAME140 and I am 140 years old.
    My name is NAME141 and I am 141 years old.
    My name is NAME142 and I am 142 years old.
    My name is NAME143 and I am 143 years old.
    My name is NAME144 and I am 144 years old.
    My name is NAME145 and I am 145 years old.
    My name is NAME146 and I am 146 years old.
    My name is NAME147 and I am 147 years old.
    My name is NAME148 and I am 148 years old.
    My name is NAME149 and I am 149 years old.
    My name is NAME150 and I am 150 years old.
    My name is NAME151 and I am 151 years old.
    My name is NAME152 and I am 152 years old.
    My name is NAME153 and I am 153 years old.
    My name is NAME154 and I am 154 years old.
    My name is NAME155 and I am 155 years old.
    My name is NAME156 and I am 156 years old.
    My name is NAME157 and I am 157 years old.
    My name is NAME158 and I am 158 years old.
    My name is NAME159 and I am 159 years old.
    My name is NAME160 and I am 160 years old.
    My name is NAME161 and I am 161 years old.
    My name is NAME162 and I am 162 years old.
    My name is NAME163 and I am 163 years old.
    My name is NAME164 and I am 164 years old.
    My name is NAME165 and I am 165 years old.
    My name is NAME166 and I am 166 years old.
    My name is NAME167 and I am 167 years old.
    My name is NAME168 and I am 168 years old.
    My name is NAME169 and I am 169 years old.
    My name is NAME170 and I am 170 years old.
    My name is NAME171 and I am 171 years old.
    My name is NAME172 and I am 172 years old.
    My name is NAME173 and I am 173 years old.
    My name is NAME174 and I am 174 years old.
    My name is NAME175 and I am 175 years old.
    My name is NAME176 and I am 176 years old.
    My name is NAME177 and I am 177 years old.
    My name is NAME178 and I am 178 years old.
    My name is NAME179 and I am 179 years old.
    My name is NAME180 and I am 180 years old.
    My name is NAME181 and I am 181 years old.
    My name is NAME182 and I am 182 years old.
    My name is NAME183 and I am 183 years old.
    My name is NAME184 and I am 184 years old.
    My name is NAME185 and I am 185 years old.
    My name is NAME186 and I am 186 years old.
    My name is NAME187 and I am 187 years old.
    My name is NAME188 and I am 188 years old.
    My name is NAME189 and I am 189 years old.
    My name is NAME190 and I am 190 years old.
    My name is NAME191 and I am 191 years old.
    My name is NAME192 and I am 192 years old.
    My name is NAME193 and I am 193 years old.
    My name is NAME194 and I am 194 years old.
    My name is NAME195 and I am 195 years old.
    My name is NAME196 and I am 196 years old.
    My name is NAME197 and I am 197 years old.
    My name is NAME198 and I am 198 years old.
    My name is NAME199 and I am 199 years old.
    My name is NAME200 and I am 200 years old.
    

    Output

    NAME10, you look younger. I thought you were 9 years old.
    NAME11, you look younger. I thought you were 10 years old.
    NAME12, you look younger. I thought you were 11 years old.
    NAME13, you look younger. I thought you were 12 years old.
    NAME14, you look younger. I thought you were 13 years old.
    NAME15, you look younger. I thought you were 14 years old.
    NAME16, you look younger. I thought you were 15 years old.
    NAME17, you look younger. I thought you were 16 years old.
    NAME18, you look younger. I thought you were 17 years old.
    NAME19, you look younger. I thought you were 18 years old.
    NAME20, you look younger. I thought you were 18 years old.
    NAME21, you look younger. I thought you were 19 years old.
    NAME22, you look younger. I thought you were 20 years old.
    NAME23, you look younger. I thought you were 21 years old.
    NAME24, you look younger. I thought you were 22 years old.
    NAME25, you look younger. I thought you were 23 years old.
    NAME26, you look younger. I thought you were 24 years old.
    NAME27, you look younger. I thought you were 25 years old.
    NAME28, you look younger. I thought you were 26 years old.
    NAME29, you look younger. I thought you were 27 years old.
    NAME30, you look younger. I thought you were 27 years old.
    NAME31, you look younger. I thought you were 28 years old.
    NAME32, you look younger. I thought you were 29 years old.
    NAME33, you look younger. I thought you were 30 years old.
    NAME34, you look younger. I thought you were 31 years old.
    NAME35, you look younger. I thought you were 32 years old.
    NAME36, you look younger. I thought you were 33 years old.
    NAME37, you look younger. I thought you were 34 years old.
    NAME38, you look younger. I thought you were 35 years old.
    NAME39, you look younger. I thought you were 36 years old.
    NAME40, you look younger. I thought you were 36 years old.
    NAME41, you look younger. I thought you were 37 years old.
    NAME42, you look younger. I thought you were 38 years old.
    NAME43, you look younger. I thought you were 39 years old.
    NAME44, you look younger. I thought you were 40 years old.
    NAME45, you look younger. I thought you were 41 years old.
    NAME46, you look younger. I thought you were 42 years old.
    NAME47, you look younger. I thought you were 43 years old.
    NAME48, you look younger. I thought you were 44 years old.
    NAME49, you look younger. I thought you were 45 years old.
    NAME50, you look younger. I thought you were 45 years old.
    NAME51, you look younger. I thought you were 46 years old.
    NAME52, you look younger. I thought you were 47 years old.
    NAME53, you look younger. I thought you were 48 years old.
    NAME54, you look younger. I thought you were 49 years old.
    NAME55, you look younger. I thought you were 50 years old.
    NAME56, you look younger. I thought you were 51 years old.
    NAME57, you look younger. I thought you were 52 years old.
    NAME58, you look younger. I thought you were 53 years old.
    NAME59, you look younger. I thought you were 54 years old.
    NAME60, you look younger. I thought you were 54 years old.
    NAME61, you look younger. I thought you were 55 years old.
    NAME62, you look younger. I thought you were 56 years old.
    NAME63, you look younger. I thought you were 57 years old.
    NAME64, you look younger. I thought you were 58 years old.
    NAME65, you look younger. I thought you were 59 years old.
    NAME66, you look younger. I thought you were 60 years old.
    NAME67, you look younger. I thought you were 61 years old.
    NAME68, you look younger. I thought you were 62 years old.
    NAME69, you look younger. I thought you were 63 years old.
    NAME70, you look younger. I thought you were 63 years old.
    NAME71, you look younger. I thought you were 64 years old.
    NAME72, you look younger. I thought you were 65 years old.
    NAME73, you look younger. I thought you were 66 years old.
    NAME74, you look younger. I thought you were 67 years old.
    NAME75, you look younger. I thought you were 68 years old.
    NAME76, you look younger. I thought you were 69 years old.
    NAME77, you look younger. I thought you were 70 years old.
    NAME78, you look younger. I thought you were 71 years old.
    NAME79, you look younger. I thought you were 72 years old.
    NAME80, you look younger. I thought you were 72 years old.
    NAME81, you look younger. I thought you were 73 years old.
    NAME82, you look younger. I thought you were 74 years old.
    NAME83, you look younger. I thought you were 75 years old.
    NAME84, you look younger. I thought you were 76 years old.
    NAME85, you look younger. I thought you were 77 years old.
    NAME86, you look younger. I thought you were 78 years old.
    NAME87, you look younger. I thought you were 79 years old.
    NAME88, you look younger. I thought you were 80 years old.
    NAME89, you look younger. I thought you were 81 years old.
    NAME90, you look younger. I thought you were 81 years old.
    NAME91, you look younger. I thought you were 82 years old.
    NAME92, you look younger. I thought you were 83 years old.
    NAME93, you look younger. I thought you were 84 years old.
    NAME94, you look younger. I thought you were 85 years old.
    NAME95, you look younger. I thought you were 86 years old.
    NAME96, you look younger. I thought you were 87 years old.
    NAME97, you look younger. I thought you were 88 years old.
    NAME98, you look younger. I thought you were 89 years old.
    NAME99, you look younger. I thought you were 90 years old.
    NAME100, you look younger. I thought you were 90 years old.
    NAME101, you look younger. I thought you were 91 years old.
    NAME102, you look younger. I thought you were 92 years old.
    NAME103, you look younger. I thought you were 93 years old.
    NAME104, you look younger. I thought you were 94 years old.
    NAME105, you look younger. I thought you were 95 years old.
    NAME106, you look younger. I thought you were 96 years old.
    NAME107, you look younger. I thought you were 97 years old.
    NAME108, you look younger. I thought you were 98 years old.
    NAME109, you look younger. I thought you were 99 years old.
    NAME110, you look younger. I thought you were 99 years old.
    NAME111, you look younger. I thought you were 100 years old.
    NAME112, you look younger. I thought you were 101 years old.
    NAME113, you look younger. I thought you were 102 years old.
    NAME114, you look younger. I thought you were 103 years old.
    NAME115, you look younger. I thought you were 104 years old.
    NAME116, you look younger. I thought you were 105 years old.
    NAME117, you look younger. I thought you were 106 years old.
    NAME118, you look younger. I thought you were 107 years old.
    NAME119, you look younger. I thought you were 108 years old.
    NAME120, you look younger. I thought you were 108 years old.
    NAME121, you look younger. I thought you were 109 years old.
    NAME122, you look younger. I thought you were 110 years old.
    NAME123, you look younger. I thought you were 111 years old.
    NAME124, you look younger. I thought you were 112 years old.
    NAME125, you look younger. I thought you were 113 years old.
    NAME126, you look younger. I thought you were 114 years old.
    NAME127, you look younger. I thought you were 115 years old.
    NAME128, you look younger. I thought you were 116 years old.
    NAME129, you look younger. I thought you were 117 years old.
    NAME130, you look younger. I thought you were 117 years old.
    NAME131, you look younger. I thought you were 118 years old.
    NAME132, you look younger. I thought you were 119 years old.
    NAME133, you look younger. I thought you were 120 years old.
    NAME134, you look younger. I thought you were 121 years old.
    NAME135, you look younger. I thought you were 122 years old.
    NAME136, you look younger. I thought you were 123 years old.
    NAME137, you look younger. I thought you were 124 years old.
    NAME138, you look younger. I thought you were 125 years old.
    NAME139, you look younger. I thought you were 126 years old.
    NAME140, you look younger. I thought you were 126 years old.
    NAME141, you look younger. I thought you were 127 years old.
    NAME142, you look younger. I thought you were 128 years old.
    NAME143, you look younger. I thought you were 129 years old.
    NAME144, you look younger. I thought you were 130 years old.
    NAME145, you look younger. I thought you were 131 years old.
    NAME146, you look younger. I thought you were 132 years old.
    NAME147, you look younger. I thought you were 133 years old.
    NAME148, you look younger. I thought you were 134 years old.
    NAME149, you look younger. I thought you were 135 years old.
    NAME150, you look younger. I thought you were 135 years old.
    NAME151, you look younger. I thought you were 136 years old.
    NAME152, you look younger. I thought you were 137 years old.
    NAME153, you look younger. I thought you were 138 years old.
    NAME154, you look younger. I thought you were 139 years old.
    NAME155, you look younger. I thought you were 140 years old.
    NAME156, you look younger. I thought you were 141 years old.
    NAME157, you look younger. I thought you were 142 years old.
    NAME158, you look younger. I thought you were 143 years old.
    NAME159, you look younger. I thought you were 144 years old.
    NAME160, you look younger. I thought you were 144 years old.
    NAME161, you look younger. I thought you were 145 years old.
    NAME162, you look younger. I thought you were 146 years old.
    NAME163, you look younger. I thought you were 147 years old.
    NAME164, you look younger. I thought you were 148 years old.
    NAME165, you look younger. I thought you were 149 years old.
    NAME166, you look younger. I thought you were 150 years old.
    NAME167, you look younger. I thought you were 151 years old.
    NAME168, you look younger. I thought you were 152 years old.
    NAME169, you look younger. I thought you were 153 years old.
    NAME170, you look younger. I thought you were 153 years old.
    NAME171, you look younger. I thought you were 154 years old.
    NAME172, you look younger. I thought you were 155 years old.
    NAME173, you look younger. I thought you were 156 years old.
    NAME174, you look younger. I thought you were 157 years old.
    NAME175, you look younger. I thought you were 158 years old.
    NAME176, you look younger. I thought you were 159 years old.
    NAME177, you look younger. I thought you were 160 years old.
    NAME178, you look younger. I thought you were 161 years old.
    NAME179, you look younger. I thought you were 162 years old.
    NAME180, you look younger. I thought you were 162 years old.
    NAME181, you look younger. I thought you were 163 years old.
    NAME182, you look younger. I thought you were 164 years old.
    NAME183, you look younger. I thought you were 165 years old.
    NAME184, you look younger. I thought you were 166 years old.
    NAME185, you look younger. I thought you were 167 years old.
    NAME186, you look younger. I thought you were 168 years old.
    NAME187, you look younger. I thought you were 169 years old.
    NAME188, you look younger. I thought you were 170 years old.
    NAME189, you look younger. I thought you were 171 years old.
    NAME190, you look younger. I thought you were 171 years old.
    NAME191, you look younger. I thought you were 172 years old.
    NAME192, you look younger. I thought you were 173 years old.
    NAME193, you look younger. I thought you were 174 years old.
    NAME194, you look younger. I thought you were 175 years old.
    NAME195, you look younger. I thought you were 176 years old.
    NAME196, you look younger. I thought you were 177 years old.
    NAME197, you look younger. I thought you were 178 years old.
    NAME198, you look younger. I thought you were 179 years old.
    NAME199, you look younger. I thought you were 180 years old.
    NAME200, you look younger. I thought you were 180 years old.
    
  • Information
    Author
    PRO1
    Language
    Spanish
    Translator
    Original language
    Catalan
    Other languages
    Catalan English
    Official solutions
    C++
    User solutions
    C++