diciembre de 2003 - intef -...

53
Calendario S.M. Diciembre 2003 Julio Castiñeira Merino 1 Diciembre de 2003 Lunes 1 Criptograma 1.Documento cifrado. 2.Especie de crucigrama en el que, propuesta una serie de conceptos, se han de sustituir por las palabras que los signifiquen, cuyas letras, trasladadas a un casillero componen una frase. Real Academia Española Criptoaritmética La criptoaritmética consiste en reemplazar las letras por cifras, cifrar por sustitución siguiendo las reglas matemáticas. en todos estos problemas la tarea consiste en sustituir cada letra por un dígito, de modo que las cuentas (operaciones) sean correctas. A igual letra, igual dígito, y a distinta letra distinto dígito. Como es habitual, los números no pueden tener ceros a la izquierda.

Upload: hoangdien

Post on 28-Sep-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 1

Diciembre de 2003

Lunes 1 Criptograma 1.Documento cifrado. 2.Especie de crucigrama en el que, propuesta una serie de conceptos, se han de sustituir por las palabras que los signifiquen, cuyas letras, trasladadas a un casillero componen una frase. Real Academia Española Criptoaritmética La criptoaritmética consiste en reemplazar las letras por cifras, cifrar por sustitución siguiendo las reglas matemáticas. en todos estos problemas la tarea consiste en sustituir cada letra por un dígito, de modo que las cuentas (operaciones) sean correctas. A igual letra, igual dígito, y a distinta letra distinto dígito. Como es habitual, los números no pueden tener ceros a la izquierda.

Page 2: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 2

Martes 2 ABECEDARIO I Soluciones Hay 4 soluciones

BCDEFA M ABCDEF 102564 4 410256 153846 4 615384 230769 4 923076 142857 5 714285

Miercoles 3 TOP Solución

208 x 208 = 43264 TOP x TOP = ENTRE

Page 3: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 3

Jueves 4 Mágico Solución

69656 + 96078 = 165734 APAGA + PATIN = MAGICO

0 1 2 3 4 5 6 7 8 9 T M C O G A I N P

Nota: hay una errata en el enunciado original. PAGA + PATIN = MAGICO no tiene solución.

Viernes 5 ANA Solución

525 x 5 = 2625 ANA x 5 = NENA

Page 4: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 4

Sábado 6 Reyes Solución

SEIS DE ENERO REYES 4104 81 17129 21314 5105 81 16129 21315 6106 81 15129 21316 7107 81 14129 21317

Domingo 7 Error Solución Tiene dos soluciones

DOS TRES SIETE 471 9821 10292 871 9421 10292

Page 5: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 5

Lunes 8 La Suma Solución Hay cinco soluciones

DOS OCHO 523 2092 623 2492 628 2512 723 2892 728 2912

Page 6: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 6

Martes 9 Playa Solución Hay 11 soluciones

PLAYA NADAR 42050 10306 31744 45383 13639 31744 53161 21417 31744 56484 24740 31744 64272 32528 31744 67595 35851 31744 69828 38084 31744 72050 40306 31744 75383 43639 31744 83161 51417 31744 94272 62528 31744

Page 7: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 7

Miércoles 10 POTENCIA

ABC = C4 BCA = D4

Solución

N N4 0 0 1 1 2 16 3 81 4 256 5 625 6 1296 7 2401 8 4096 9 6561

Si calculamos las potencias cuartas de una cifra podemos observar que sólo dos

potencias tienen tres cifras 25644 = y 62554 = . Obviamente C = 5, B = 2, A = 6 y D = 4.

Jueves 11 ZOO

ZOO2 = TOPAC Solución ZOO = 299 TOPAC = 89401

Page 8: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 8

Viernes 12 Suma Solución Hay 274 soluciones

DIEZ DOS DOCE DIEZ DOS DOCE 1245 139 1384 3427 385 3812 1249 135 1384 3467 389 3856 1256 149 1405 3469 387 3856 1257 138 1395 3471 386 3857 1257 148 1405 3476 381 3857 1258 137 1395 3504 386 3890 1258 147 1405 3506 384 3890 1259 146 1405 3582 396 3978 1302 148 1450 3586 392 3978 1308 142 1450 4067 459 4526 1346 158 1504 4069 457 4526 1348 156 1504 4071 456 4527 1367 159 1526 4076 451 4527 1369 157 1526 4078 459 4537 1392 157 1549 4079 458 4537 1397 152 1549 4081 457 4538 1402 158 1560 4082 456 4538 1403 157 1560 4086 452 4538 1407 153 1560 4087 451 4538 1408 152 1560 4102 458 4560 1423 159 1582 4103 457 4560 1429 153 1582 4107 453 4560 1435 168 1603 4108 452 4560 1436 157 1593 4123 459 4582 1437 156 1593 4129 453 4582 1438 165 1603 4135 468 4603 1457 168 1625 4136 457 4593 1458 167 1625 4137 456 4593 1472 165 1637 4138 465 4603 1475 162 1637 4157 468 4625 1492 167 1659 4158 467 4625 1497 162 1659 4172 465 4637 1502 168 1670 4175 462 4637 1508 162 1670 4192 467 4659 1523 179 1702 4197 462 4659 1524 168 1692 4201 469 4670 1524 178 1702 4209 461 4670 1528 164 1692 4235 478 4713 1528 174 1702 4238 475 4713 1529 173 1702 4256 479 4735 1546 178 1724 4259 476 4735

Page 9: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 9

1548 176 1724 4261 475 4736 DIEZ DOS DOCE DIEZ DOS DOCE 1562 174 1736 4265 471 4736 1564 172 1736 4291 478 4769 1634 189 1823 4298 471 4769 1639 184 1823 4301 479 4780 1645 189 1834 4309 471 4780 1649 185 1834 4312 489 4801 1673 184 1857 4315 476 4791 1674 183 1857 4315 486 4801 1694 185 1879 4316 475 4791 1695 184 1879 4316 485 4801 1704 186 1890 4319 482 4801 1706 184 1890 4325 487 4812 1752 193 1945 4327 485 4812 1753 192 1945 4367 489 4856 1762 194 1956 4369 487 4856 1764 192 1956 4371 486 4857 2078 239 2317 4376 481 4857 2079 238 2317 5078 569 5647 2145 239 2384 5079 568 5647 2149 235 2384 5081 567 5648 2156 249 2405 5087 561 5648 2157 238 2395 5102 568 5670 2157 248 2405 5108 562 5670 2158 237 2395 5123 579 5702 2158 247 2405 5124 568 5692 2159 246 2405 5124 578 5702 2301 259 2560 5128 564 5692 2309 251 2560 5128 574 5702 2345 269 2614 5129 573 5702 2349 265 2614 5146 578 5724 2378 269 2647 5148 576 5724 2379 268 2647 5162 574 5736 2381 267 2648 5164 572 5736 2387 261 2648 5201 579 5780 2391 268 2659 5204 576 5780 2398 261 2659 5206 574 5780 2401 269 2670 5209 571 5780 2409 261 2670 5213 578 5791 2435 278 2713 5214 587 5801 2438 275 2713 5217 584 5801 2456 279 2735 5218 573 5791 2459 276 2735 5293 586 5879 2461 275 2736 5296 583 5879 2465 271 2736 5304 586 5890 2491 278 2769 5306 584 5890 2498 271 2769 5382 596 5978 2501 279 2780 5386 592 5978 2504 276 2780 6034 679 6713 2506 274 2780 6035 678 6713 2509 271 2780 6038 675 6713 2513 278 2791 6039 674 6713

Page 10: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 10

2514 287 2801 6045 679 6724 DIEZ DOS DOCE DIEZ DOS DOCE 2517 284 2801 6049 675 6724 2518 273 2791 6051 674 6725 2593 286 2879 6054 671 6725 2596 283 2879 6134 689 6823 2603 287 2890 6139 684 6823 2607 283 2890 6145 689 6834 2683 295 2978 6149 685 6834 2685 293 2978 6173 684 6857 3067 349 3416 6174 683 6857 3069 347 3416 6194 685 6879 3072 345 3417 6195 684 6879 3075 342 3417 6203 687 6890 3078 349 3427 6207 683 6890 3079 348 3427 6283 695 6978 3081 347 3428 6285 693 6978 3087 341 3428 7023 789 7812 3102 348 3450 7029 783 7812 3108 342 3450 7034 789 7823 3146 358 3504 7039 784 7823 3148 356 3504 7041 783 7824 3167 359 3526 7043 781 7824 3169 357 3526 7045 789 7834 3192 357 3549 7049 785 7834 3197 352 3549 7051 784 7835 3201 359 3560 7054 781 7835 3209 351 3560 7056 789 7845 3245 369 3614 7059 786 7845 3249 365 3614 7061 785 7846 3278 369 3647 7065 781 7846 3279 368 3647 7104 786 7890 3281 367 3648 7106 784 7890 3287 361 3648 7152 793 7945 3291 368 3659 7153 792 7945 3298 361 3659 7162 794 7956 3401 379 3780 7164 792 7956 3409 371 3780 8052 893 8945 3412 389 3801 8053 892 8945 3415 376 3791 8062 894 8956 3415 386 3801 8064 892 8956 3416 375 3791 8072 895 8967 3416 385 3801 8073 894 8967 3419 382 3801 8074 893 8967 3425 387 3812 8075 892 8967

Page 11: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 11

Sabado 13 Factura en clave Se sabe además que DIEZ es par y TRES impar Solución

9672 + 1075 = 10747 Si permitimos que diez sea impar y tres par hay 7 soluciones.

DIEZ TRES TRECE 9564 1062 10626 9672 1075 10747 9673 1074 10747 9675 1072 10747 9782 1086 10868 9783 1085 10868 9785 1083 10868

Domingo 14 Multiplicación

Solución

16232 x 581 = 9430792

Lunes 15 Plan I Solución

7486 + 7680 + 90436 = 105602

Page 12: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 12

Martes 16 E.T. Matemático

(MI)2 = CASA Solución

922 = 8464

Jueves 17 FLORES Solución Hay ocho soluciones

ROSA LILA NARDO 4623 8783 13406 5462 7072 12534 5492 7072 12564 7035 8685 15720 7045 8685 15730 8643 5253 13896 9075 6865 15940 9874 5054 14928

Page 13: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 13

Jueves 18 EDIPO

El cero no interviene Solución

62 + 6868 + 61 + 6268 = 13259

Si se permite que intervenga el cero, hay otra soluc ión: 60 + 6868 + 61 + 6068 = 13057

Viernes 19 CITAS Solución Hay dos soluciones

DIA HORA CITAS 507 9867 10374 807 9567 10374

Page 14: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 14

Sábado 20 PLAN II Solución Hay 16 soluciones

CINE MAS FAENA MENOS 2081 593 49189 51863 2081 597 49189 51867 3102 784 68208 72094 3102 785 68208 72095 3762 580 48268 52610 3762 589 48268 52619 5143 970 87347 93460 5143 972 87347 93462 5263 971 87367 93601 5263 974 87367 93604 5843 270 17347 23460 5843 279 17347 23469 5963 274 17367 23604 5963 278 17367 23608 8094 361 26496 34951 8094 367 26496 34957

Domingo 21 ABECEDARIO II

Solución

21978 x 4 = 87912

Page 15: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 15

Lunes 22 NOMBRES ¿Qué cifra representa cada letra para R = 5 Solución Si exigimos que las letras E , A y S sean distintas de cero el problema no tiene solución. Si relajamos esta propiedad el criptograma EVA + ANA = SARA tiene 12 soluciones

EVA ANA SARA 940 80 1020 950 70 1020 950 80 1030 960 70 1030 960 80 1040 970 50 1020 970 60 1030 970 80 1050 980 40 1020 980 50 1030 980 60 1040 980 70 1050

Luego hay dos soluciones para R = 5. EVA = 970, ANA = 080 y SARA = 1050 y EVA = 980, ANA = 070 y SARA = 1050 Nota: El criptograma EVA + ANA + EVA = SARA tiene solución única para R = 7 y esta es : 495 + 585 + 495 = 1575

Page 16: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 16

Martes 23 SOS

IS + SO = SOS Solución

91 + 10 = 101 Nota: El criptogrma IS x SO =SOS no tiene solución. Creemos que hay una errata en el texto.

Miércoles 24 Feliz Año Solución Hay 40 soluciones que se recogen en la tabla

BON ANY NOU BON ANY NOU 259 790 951 683 930 387 259 791 950 683 932 385 267 970 763 683 935 382 267 973 760 683 937 380 359 690 951 759 290 951 359 691 950 759 291 950 367 871 762 817 470 713 367 872 761 817 473 710 417 870 713 825 651 524 417 873 710 825 654 521 458 683 859 867 371 762 458 689 853 867 372 761 475 952 573 967 270 763 475 953 572 967 273 760 625 851 524 975 452 573 625 854 521 975 453 572 658 483 859 983 630 387 658 489 853 983 632 385 659 390 951 983 635 382 659 391 950 983 637 380

Page 17: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 17

Jueves 25 AMOR Solución Hay cuarenta soluciones que se recogen en la tabla

DAME MAS AMOR DAME MAS AMOR 8912 193 9105 8945 492 9437 8912 194 9106 8946 491 9437 8912 195 9107 8951 592 9543 8913 192 9105 8951 596 9547 8913 194 9107 8952 591 9543 8914 192 9106 8956 591 9547 8914 193 9107 8961 692 9653 8915 192 9107 8961 693 9654 8923 294 9217 8962 691 9653 8924 293 9217 8963 691 9654 8931 394 9325 8963 694 9657 8931 395 9326 8964 693 9657 8931 396 9327 8971 792 9763 8934 391 9325 8971 793 9764 8935 391 9326 8971 794 9765 8936 391 9327 8972 791 9763 8941 495 9436 8972 793 9765 8941 496 9437 8973 791 9764 8942 495 9437 8973 792 9765 8945 491 9436 8974 791 9765

Page 18: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 18

Viernes 26 ¿Verdadero o Falso? Utilizando todas las cifras, comprueba que dos errores pueden dar un acierto en la siguiente suma: ¿Qué cifra representa cada letra? Solución Hay doce soluciones que se muestran en la tabla

FALSO CIERTO 67290 134580 67920 135840 69270 138540 72690 145380 72930 145860 73290 146580 76920 153840 79230 158460 79320 158640 92670 185340 92730 185460 93270 186540

Page 19: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 19

Sábado 27 PARENTESCO Solución Hay cuatro soluciones que se muestran en la tabla

PADRE ABUELO 51438 102876 51469 102938 51846 103692 71928 143856

Page 20: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 20

Domingo 28 DINERO Solución

9567 + 1085 = 10652

Page 21: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 21

Lunes 29 Vocales

Solución Hay seis soluciones que se muestran en la tabla

AAAA EEEE UOOOU 3333 8888 12221 4444 7777 12221 5555 6666 12221 6666 5555 12221 7777 4444 12221 8888 3333 12221

Page 22: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 22

Martes 30 ABECEDARIO III Solución Hay dos soluciones que se muestran en la tabla

AB CD DDD 21 37 777 37 15 555

Miercoles 31 AFIRMATIVO Solución

50 + 50 +50 +50 +50 +50 +50 = 350

Page 23: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 23

Apéndice Programas Matlab para buscar las soluciones de los criptogramas % Criptograma ABECEDARIO I % Diciembre 2 Calendario SM 2003-04 % Julio Castiñeira % % BCDEFA x M = ABCDEF k = 0; clear sol; for a = 1:9 for b = 1:9 if (b ~= a) for c = 0:9 if (c ~= a) & (c ~= b) for d = 0:9 if (d ~= a) & (d ~= b) & (d ~= c) for e = 0:9 if (e ~= a) & (e ~= b) & (e ~= c) & (e ~= d) for f = 0:9 if (f ~= a) & (f ~= b) & (f ~= c) & (f ~= d) & (f ~= e) bcdefa = b*100000 + c*10000 + d*1000 + e*100 + f*10 + a; for m = 2:9, abcdef = bcdefa * m; d6 = mod(floor(abcdef/100000),100); d5 = mod(floor(abcdef/10000),10); d4 = mod(floor(abcdef/1000),10); d3 = mod(floor(abcdef/100),10); d2 = mod(floor(abcdef/10),10); d1 = mod(abcdef,10); if (d6 == a) & (d5 == b) & (d4 == c) & (d3 == d) & (d2 == e) & (d1 == f) k = k + 1; solucion(k,:) = [bcdefa, m, abcdef]; end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} solucion

Page 24: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 24

% Criptograma TOP % Diciembre 3 Calendario SM 2003-04 % Julio Castiñeira % % TOP x TOP = ENTRE k=0; clear sol; for t = 1:9, for o = 0:9, if (o ~= t) for p = 0:9, if (p ~= t) & (p ~= o) top = t*100 + o*10 + p ; entre = top * top; d5 = mod(floor(entre/10000),10); d4 = mod(floor(entre/1000),10); d3 = mod(floor(entre/100),10); d2 = mod(floor(entre/10),10); d1 = mod(entre,10); if (d5 == d1) & (d3 == t) e = d1; n = d4 ; r = d2; if (e ~= t) & (e ~= o) & (e ~= p) if (n ~= t) & (n ~= o)& (n ~= p)& (n ~= e) if (r ~= t) & (r ~= o)& (r ~= p) & (r ~= e) & (r ~= n) k = k + 1; sol(k,:)=[top, entre]; end, end, end, end, end, end, end end, end {k, 'soluciones'} sol

Page 25: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 25

% Diciembre 4 Calendario SM 2003-04 % Julio Castiñeira % MAGICO % % Criptograma % APAGA + PATIN = MAGICO k=0; clear sol; for a = 1:9, for p = 0:9, if (p ~= a) for g = 0:9, if (g ~= a) & (g ~= p) apaga = a*10000 + p*1000 + a*100+ g*10 + a; for t = 0:9 if (t ~= a) & (t ~= p) & (t ~= g) for i = 0:9 if (i ~= a) & (i ~= p) & (i ~= g) & (i ~= t) for n = 0:9 if (n ~= a) & (n ~= p) & (n ~= g) & (n ~= t) & (n ~= i) patin= p*10000 + a*1000 + t*100 + i*10 + n; magico = apaga + patin; d6 = mod(floor(magico/100000),100); d5 = mod(floor(magico/10000),10); d4 = mod(floor(magico/1000),10); d3 = mod(floor(magico/100),10); d2 = mod(floor(magico/10),10); d1 = mod(magico,10); if (d5 == a) & (d4 == g) & (d3 == i) m = d6; c = d2; o = d1; if (m >0 ) & (m < 10) if (m ~= a) & (m ~= p) & (m ~= g) & (m ~= t) & (m ~= i) & (m ~= n) if (c ~= a) & (c ~= p) & (c ~= g) & (c ~= t) & (c ~= i) & (c ~= n) & (c ~= m) if (o ~= a) & (o ~= p) & (o ~= g) & (o ~= t) & (o ~= i) & (o ~= n) & (o ~= m) & (o ~= c) k=k+1; sol(k,:)=[apaga, patin, magico]; end, end, end, end, end, end, end, end, end, end, end, end, end, end end, end {k, 'soluciones'} sol

Page 26: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 26

% Diciembre 5 Calendario SM 2003-04 % Julio Castiñeira % Criptograma ANA 5 % % ANA x 5 = NENA k = 0; clear sol; for a = 1:9 for n = 0:9 if (n ~= a) ana = a*100 + n* 10 + a; nena = ana * 5; d4 = mod(floor(nena/1000), 100); d3 = mod(floor(nena/100), 10); d2 = mod(floor(nena/10), 10); d1 = mod(nena, 10); if (d4 == n) & (d2 == n) & (d1 == a) e = d3; if (e ~= a) & (e ~= n) k = k + 1; sol(k,:) = [ana, nena]; end, end, end, end, end, {k, 'soluciones'} sol

Page 27: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 27

% Diciembre 6 Calendario SM 2003-04 % Julio Castiñeira %Criptograma REYES % % SEIS + DE + ENERO = REYES k = 0; clear sol; for s = 1:9 % s inicial de seis for e = 1:9 % e inicial de enero if (e ~=s) for i = 0:9 if (i ~= s) & (i ~= e) seis = s*1000 + e*100 + i*10 + s; for d = 1:9 % d inicial de de if (d ~= s) & (d ~= e) & (d ~= i) de = d*10 + e; for (n = 0:9) if (n ~= s) & (n ~= e) & (n ~= i) & (n ~= d) for (r = 1:9) % r inicial de reyes if (r ~= s) & (r ~= e) & (r ~= i) & (r ~= d) & (r ~= n) for (o = 0:9) if (o ~= s) & (o ~= e) & (o ~= i) & (o ~= d) & (o ~= n) & (o ~= r) enero = e*10000 + n*1000 + e*100 + r*10 + o; reyes = seis + de + enero; d5 = mod(floor(reyes/10000),100); d4 = mod(floor(reyes/ 1000),10); d3 = mod(floor(reyes/ 100),10); d2 = mod(floor(reyes/ 10),10); d1 = mod(reyes,10); if (d5 == r) & (d4 == e) & (d2 == e) & (d1 == s) y = d3; if (y ~= s) & (y ~= e) & (y ~= i) & (y ~= d) & (y ~= n) & (y ~= r) & (y ~= o) k = k+1; sol(k,:)=[seis, de, enero, reyes]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 28: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 28

% Diciembre 7 Calendario SM 2003-04 % Julio Castiñeira % Criptograma ERROR % % DOS + TRES = SIETE k = 0; clear sol; for d = 1:9 % d es la inicial de dos for o = 0:9 if (d ~= o) for s = 1:9 % s es la inicial de siete if (s ~= d) & (s ~= o) dos = d*100 + o*10 + s; for t = 1:9 % t es la inicial de tres if (t ~= d) & (t ~= o) & (t ~= s) for (r = 0:9) if (r ~= d) & (r ~= o) & (r ~= s) & (r ~= t) for (e = 0:9) if (e ~= d) & (e ~= o) & (e ~= s) & (e ~= t) & (e ~= r) tres = t*1000 + r*100 + e*10 + s; siete = dos + tres; d5 = mod(floor(siete/10000),100); d4 = mod(floor(siete/ 1000),10); d3 = mod(floor(siete/ 100),10); d2 = mod(floor(siete/ 10),10); d1 = mod(siete,10); if (d5 == s) & (d3 == e) & (d2 == t) & (d1 == e) i = d4; if (i ~= d) & (i ~= o) & (i ~= s) & (i ~= t) & (i ~= r) & (i ~= e) k = k+1; sol(k,:)=[dos, tres, siete]; end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 29: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 29

% Criptograma La Suma % Diciembre 8 Calendario SM 2003-04 % Julio Castiñeira % % DOS + DOS + DOS + DOS = OCHO k = 0; clear sol; for d = 1:9 % dos empieza por d for o = 1:9 % ocho empieza por o if (d ~= o) for s = 0:9 if (s ~= d) & (s ~= o) dos = d*100 + o*10 + s; ocho = dos * 4; d4 = mod(floor(ocho/ 1000),100); d3 = mod(floor(ocho/ 100),10); d2 = mod(floor(ocho/ 10),10); d1 = mod(ocho, 10); if (d4 == o) & (d1 == o) c = d3; h = d2; if (c ~= d) & (c ~= o) & (c ~= s) if (h ~= d) & (h ~= o) & (h ~= s) & (h ~= c) k = k+1; sol(k,:)=[dos, ocho]; end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 30: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 30

% Criptograma PLAYA % Diciembre 9 Calendario SM 2003-04 % Julio Castiñeira % PLAYA - NADAR = 31744 k = 0; clear sol; for p = 1:9 for l = 1:9 if (p ~= l) for a = 0:9 if (a ~= p) & (a ~= l) for y = 0:9 if (y ~= p) & (y ~= l) & (y ~= a) playa = p*10000 + l*1000 + a*100 + y*10 + a; for n = 1:9 if (n ~= p) & (n ~= l) & (n ~= a)& (n ~= y) for d = 0:9 if (d ~= p) & (d ~= l) & (d ~= a) & (d ~= y) & (d ~= n) for r = 0:9 if (r ~= p) & (r ~= l) & (r ~= a) & (r ~= y) & (r ~= n) & (r ~= d) nadar = n*10000 + a*1000 + d*100 + a *10 + r; test = playa - nadar ; if (test == 31744) k = k+1; sol(k,:)=[playa, nadar]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 31: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 31

% Criptograma ZOO % Diciembre 11 Calendario SM 2003-04 % Julio Castiñeira % % ZOO * ZOO = TOPAC k = 0; clear sol; for z = 1:9 for o = 0:9 if (o ~= z) zoo = z*100 + o*10 + o; topac = zoo^2; d5 = mod(floor(topac/10000),100); d4 = mod(floor(topac/1000),10); d3 = mod(floor(topac/100),10); d2 = mod(floor(topac/10),10); d1 = mod(topac,10); if (d4 == o) t = d5; p = d3; a =d2; c = d1; if (t ~= z) & (t ~= o) & (t > 0) & (t <10) if (p ~= z) & (p ~= o) & (p ~= t) if (a ~= z) & (a ~= o) & (a ~= t) & (a ~= p) if (c ~= z) & (c ~= o) & (c ~= t) & (c ~= p)& (c ~= a) k = k+1; sol(k,:)=[zoo, topac]; end, end, end, end, end, end, end, end, {k,'soluciones'} sol

Page 32: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 32

% Criptograma SUMA Viernes 12 % Diciembre 12 Calendario SM 2003-04 % Julio Castiñeira% % DIEZ + DOS = DOCE k = 0; clear sol; for d = 1:9 for i = 0:9 if (i ~= d) for e = 0:9 if (e ~= d) & (e ~= i) for z = 0:9 if (z ~= d) & (z ~= i) & (z ~= e) diez = d*1000 + i*100 + e*10 + z; for o = 0:9 if (o ~= d) & (o ~= i) & (o ~= e) & (o ~= z) for s = 0:9 if (s ~= d) & (s ~= i) & (s ~= e) & (s ~= z)& (s ~= o) dos = d*100 + o*10 + s; doce = diez + dos; d4 = mod(floor(doce/1000),100); d3 = mod(floor(doce/100),10); d2 = mod(floor(doce/10),10); d1 = mod(doce,10); if (d4 == d) & (d3 == o) & (d1 == e) c = d2; if (c ~= d) & (c ~= i) & (c ~= e) & (c ~= z) & (c ~= o) & (c ~= s) k = k+1; sol(k,:)=[diez, dos, doce]; end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 33: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 33

% Criptograma Factura en clave % Diciembre 13 Calendario SM 2003-04 % Julio Castiñeira% % DIEZ + TRES = TRECE % Se sabe ademas que DIEZ es par y trece impar k = 0; clear sol; for d = 1:9 for i = 0:9 if (i ~= d) for e = 0:9 if (e ~= d) & (e ~= i) for z = 0:9 if (z ~= d) & (z ~= i) & (z ~= e) diez = d*1000 + i*100 + e*10 + z; for t = 1:9 if (t ~= d) & (t ~= i) & (t ~= e) & (t ~= z) for r = 0:9 if (r ~= d) & (r ~= i) & (r ~= e) & (r ~= z)& (r ~= t) for s = 0:9 if (s ~= d) & (s ~= i) & (s ~= e) & (s ~= z) & (s ~= t) & (s ~= r) tres = t*1000 + r*100 + e*10 + s; trece = diez + tres; tre = t*100 + r*10 + e; test1 = floor(trece/100); if ( test1 == tre) un = mod(trece,10); if (un == e) de = mod(floor(trece/10),10); if (de ~= d) & (de ~= i) & (de ~= e) & (de ~= z) & (de ~= t) & (de ~= r) if (mod(diez,2) == 0) & (mod(tres, 2) ==1) % DIEZ es par y TRES impar k = k+1; sol(k,:)=[diez, tres, trece]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 34: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 34

% Criptograma Multiplicacion % Diciembre 14 Calendario SM 2003-04 % Julio Castiñeira % SIETE x DOS = CATORCE k=0; clear sol; for s = 1:9, for i = 0:9, if (i ~= s) for e = 0:9, if (e ~= s) & (e ~= i) for t = 0:9 if (t ~= s) & (t ~= i) & (t ~= e) siete = s*10000 + i*1000 + e*100 + t*10 + e; for d = 1:9 if (d ~= s) & (d ~= i) & (d ~= e) & (d ~= t) for o = 0:9 if (o ~= s) & (o ~= s) & (o ~= i) & (o ~= e) & (o ~= d) dos = d*100 + o*10 + s; catorce = siete * dos; d7 = mod(floor(catorce/1000000),100); d6 = mod(floor(catorce/100000),10); d5 = mod(floor(catorce/10000),10); d4 = mod(floor(catorce/1000),10); d3 = mod(floor(catorce/100),10); d2 = mod(floor(catorce/10),10); d1 = mod(catorce,10); if (d1 ==e) & (d2 == d7) & (d4 ==0) & (d5 == t) c = d7; a = d6; r = d3; if (c ~= s) & (c ~= i) & (c ~= e) & (c ~= t) & (c ~= d) & (c ~= o) & (c > 0) & (c <10) if (a ~= s) & (a ~= i) & (a ~= e) & (a ~= t) & (a ~= d) & (a ~= 0) & (a ~= c) if (r ~= s) & (r ~= i) & (r ~= e) & (r ~= t) & (r ~= d) & (r ~= 0) & (r ~= c) & (r ~= s) if (t ~= c) & (t ~= a) k=k+1; sol(k,:)=[siete, dos, catorce]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end end, end {k, 'soluciones'} sol

Page 35: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 35

% Criptograma Plan I % Diciembre 15 Calendario SM 2003-04 % Julio Castiñeira % CINE + CENA + BAILE = PASEAR k=0; clear sol; for c = 1:9, for i = 0:9, if (i ~= c) for n = 0:9, if (n ~= c) & (n ~= i) for e = 0:9 if (e ~= c) & (e ~= i) & (e ~= n) cine = c*1000 + i*100 + n*10 + e; for a = 0:9 if (a ~= c) & (a ~= i) & (a ~= n) & (a ~= e) cena = c*1000 + e*100 + n*10 + a; for b = 1:9 if (b ~= c) & (b ~= i) & (b ~= n) & (b ~= e) & (b ~= a) for l = 0:9 if (l ~= c) & (l ~= i) & (l ~= n) & (l ~= e) & (l ~= a) & (l ~= b) baile = b*10000 + a*1000 + i*100 +l*10 + e; pasear = cine + cena + baile; d6 = mod(floor(pasear/100000),10); d5 = mod(floor(pasear/10000),10); d4 = mod(floor(pasear/1000),10); d3 = mod(floor(pasear/100),10); d2 = mod(floor(pasear/10),10); d1 = mod(pasear,10); if (d2 == a) & (d3 == e) & (d2 == d5) & (d6 ~= 0) p = d6; s = d4; r = d1; if (p ~= c) & (p ~= i) & (p ~= n) & (p ~= e) & (p ~= a) & (p ~= b) & (p ~= i) & (p ~= l) if (s ~= c) & (s ~= i) & (s ~= n) & (s ~= e) & (s ~= a) & (s ~= b) & (s ~= i) & (s ~= l) & (s ~= p) if (r ~= c) & (r ~= i) & (r ~= n) & (r ~= e) & (r ~= a) & (r ~= b) & (r ~= i) & (r ~= l) & (r ~= p) & (r ~= s) k=k+1; sol(k,:)=[cine, cena, baile, pasear]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end end, end, {k, 'soluciones'} sol

Page 36: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 36

% Criptograma E.T. Matematico % Diciembre 16 Calendario SM 2003-04 % Julio Castiñeira % % MI * MI = CASA k = 0; clear sol; for m = 1:9 for i =0:9 if (m ~= i) mi = m*10 + i; casa = mi^2; d4 = mod(floor(casa/1000),100); d3 = mod(floor(casa/100),10); d2 = mod(floor(casa/10),10); d1 = mod(casa,10); if (d3 == d1) & (d4 >0) & (d4 <10) if (d4 ~= m) & (d4 ~= i) if (d2 ~= m) & (d2 ~= i) & (d2 ~= d1) if (d1 ~= m) & (d1 ~= i) k = k +1; sol(k,:) =[mi, casa]; end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 37: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 37

% Criptograma Flores % Diciembre 17 Calendario SM 2003-04 % Julio Castiñeira % ROSA * LILA = NARDO k=0; clear sol; for r = 1:9, for o = 0:9, if (o ~= r) for s = 0:9, if (s ~= r) & (s ~= o) for a = 0:9 if (a ~= r) & (a ~= o) & (a ~= s) rosa = r*1000 + o*100 + s*10 + a; for l= 1:9 if (l ~= r) & (l ~= o) & (l ~= s) & (l ~= a) for i = 0:9 if (i ~= r) & (i ~= o) & (i ~= s) & (i ~= a) & (i ~= l) lila = l*1000 + i*100 + l*10 + a; nardo = rosa + lila; d5 = mod(floor(nardo/10000),10); d4 = mod(floor(nardo/1000),10); d3 = mod(floor(nardo/100),10); d2 = mod(floor(nardo/10),10); d1 = mod(nardo,10); if (d1 == o) & (d3 == r) & (d4 == a) & (d5 >0) n = d5; d = d2; if (n ~= r) & (n ~= o) & (n ~= s) & (n ~= a) & (n ~= l) & (n ~= i) if (d ~= r) & (d ~= o) & (d ~= s) & (d ~= a) & (d ~= l) & (d ~= i) & (d ~= n) k=k+1; sol(k,:)=[rosa, lila, nardo]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 38: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 38

% Criptograma EDIPO % Diciembre 18 Calendario SM 2003-04 % Julio Castiñeira % MI + MAMA + ME + MIMA = EDIPO % El cero no interviene k=0; clear sol; for m = 1:9 for i = 1:9 if (i ~= m) mi = m*10 + i; for a= 1:9 if (a ~= m) & (a ~= i) mama = m*1000 + a*100 + m*10 + a; mima = m*1000 + i*100 + m*10 + a; for e = 1:9 if (e ~= m) & (e ~= i) & (e ~= a) me = m*10 + e; edipo = mi + mama + me + mima; d5 = mod(floor(edipo/10000),10); d4 = mod(floor(edipo/1000),10); d3 = mod(floor(edipo/100),10); d2 = mod(floor(edipo/10),10); d1 = mod(edipo,10); if (d5 > 0) & (d5 == e) & (d3 == i) d = d4; p = d2; o = d1; if (d ~= m) & (d ~= i) & (d ~= a) & (d ~= e) if (p ~= m) & (p ~= i) & (p ~= a) & (p ~= e) & (p ~= d) if (o ~= m) & (o ~= i) & (o ~= a) & (o ~= e) & (o ~= d)& (o ~= p) k=k+1; sol(k,:)=[mi, mama, me, mima, edipo]; end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 39: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 39

% Criptograma CITAS % Diciembre 19 Calendario SM 2003-04 % Julio Castiñeira % DIA + HORAS = CITAS k=0; clear sol; for d = 1:9 for i = 0:9 if (i ~= d) for a= 0:9 if (a ~= d) & (a ~= i) dia = d*100 + i*10 + a; for h = 1:9 if (h ~= d) & (h ~= i) & (h ~= a) for o = 0:9 if (o ~= d) & (o ~= i) & (o ~= a) & (o ~= h) for r = 0:9 if (r ~= d) & (r ~= i) & (r ~= a) & (r ~= h) & (r ~= o) hora = h*1000 + o*100 + r*10 + a; citas = dia + hora; d5 = mod(floor(citas/10000),10); d4 = mod(floor(citas/1000),10); d3 = mod(floor(citas/100),10); d2 = mod(floor(citas/10),10); d1 = mod(citas,10); if (d5 > 0) & (d4 == i) & (d2 == a) c = d5; t = d3; s = d1; if (c ~= d) & (c ~= i) & (c ~= a) & (c ~= h) & (c ~= o) & (c ~= r) if (t ~= d) & (t ~= i) & (t ~= a) & (t ~= h) & (t ~= o) & (t ~= r) & (t ~= c) if (s ~= d) & (s ~= i) & (s ~= a) & (s ~= h) & (s ~= o) & (s ~= r) & (s ~= c) & (s ~= t) k=k+1; sol(k,:)=[dia, hora, citas]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 40: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 40

% Criptograma PLANII Sabado 20 % Diciembre 20 Calendario SM 2003-04 % Julio Castiñeira % CINE + MAS + FAENA = MENOS k=0; clear sol; for c = 1:9, for i = 0:9, if (i ~= c) for n = 0:9, if (n ~= c) & (n ~= i) for e = 0:9 if (e ~= c) & (e ~= i) & (e ~= n) cine = c*1000 + i*100 + n*10 + e; for m = 1:9 if (m ~= c) & (m ~= i) & (m ~= n) & (m ~= e) for a = 0:9 if (a ~= c) & (a ~= i) & (a ~= n) & (a ~= e) & (a ~= m) for s = 0:9 if (s ~= c) & (s ~= i) & (s ~= n) & (s ~= e) & (s ~= m) & (s ~= a) mas = m*100 + a*10 + s; for f = 1:9 if (f ~= c) & (f ~= i) & (f ~= n) & (f ~= e) & (f ~= m) & (f ~= a) & (f ~= s) faena = f*10000 + a*1000 + e*100 + n*10 + a; menos = cine + mas + faena; d5 = mod(floor(menos/10000),10); d4 = mod(floor(menos/1000),10); d3 = mod(floor(menos/100),10); d2 = mod(floor(menos/10),10); d1 = mod(menos,10); if (d5 == m) & (d4 == e) & (d3 == n) & (d1 == s) o = d2; if (o ~= c) & (o ~= i) & (o ~= n) & (o ~= e) & (o ~= m) & (o ~= a) & (o ~= s) & (o ~= f) k=k+1; sol(k,:)=[cine, mas, faena, menos]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end end, end, {k, 'soluciones'} sol

Page 41: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 41

% Criptograma ABECEDARIO II % Diciembre 21 Calendario SM 2003-04 % Julio Castiñeira % ABCDE x H = EDCBA k=0; clear sol; for h = 1:9, for a = 1:9, if (a ~= h) for b= 0:9, if (b ~= h) & (b ~= a) for c = 0:9 if (c ~= h) & (c ~= a) & (c ~= b) for d = 0:9 if (d ~= h) & (d ~= a) & (d ~= b) & (d ~= c) for e = 1:9 if (e ~= h) & (e ~= a) & (e ~= b) & (e ~= c) & (e ~= d) abcde = a*10000 + b*1000 + c*100 + d*10 + e; edcba =abcde * h; if (edcba < 99999) d5 = mod(floor(edcba/10000),10); d4 = mod(floor(edcba/1000),10); d3 = mod(floor(edcba/100),10); d2 = mod(floor(edcba/10),10); d1 = mod(edcba,10); if (d5 == e) & (d4 == d) & (d3 == c) & (d2 == b) & (d1 == a) k=k+1; sol(k,:)=[abcde, h, edcba]; end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 42: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 42

% Criptograma NOMBRES % Diciembre 22 Calendario SM 2003-04 % Julio Castiñeira % EVA + ANA = SARA % Permite que la A valga cero k=0; clear sol; for e = 1:9 for v= 0:9 if (v ~= e) for a= 0:9 if (a ~= e) & (a ~= v) eva = e*100 + v*10 + a; for n = 0:9 if (n ~= e) & (n ~= v) & (n ~= a) ana = a*100 + n*10 + a; sara = eva + ana; d4 = mod(floor(sara/1000),10); d3 = mod(floor(sara/100),10); d2 = mod(floor(sara/10),10); d1 = mod(sara,10); if (d3 == a) & (d1 == a) r = d2; s = d4; if (r ~= e) & (r ~= v) & (r ~= a) & (r ~= n) if (s ~= e) & (s ~= v) & (s ~= a) & (s ~= n) & (s ~= r) k=k+1; sol(k,:)=[eva, ana, sara]; end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 43: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 43

% Diciembre 22 Calendario SM 2003-04 % Julio Castiñeira % Criptograma NOMBRES % % EVA + ANA + EVA = SARA % Tiene solucion k=0; clear sol; for e = 1:9 for v= 0:9 if (v ~= e) for a= 1:9 if (a ~= e) & (a ~= v) eva = e*100 + v*10 + a; for n = 0:9 if (n ~= e) & (n ~= v) & (n ~= a) ana = a*100 + n*10 + a; sara = eva + ana + eva; d4 = mod(floor(sara/1000),10); d3 = mod(floor(sara/100),10); d2 = mod(floor(sara/10),10); d1 = mod(sara,10); if (d3 == a) & (d1 == a) r = d2; s = d4; if (r ~= e) & (r ~= v) & (r ~= a) & (r ~= n) & (r == 7) if (s ~= e) & (s ~= v) & (s ~= a) & (s ~= n) & (s ~= r) k=k+1; sol(k,:)=[eva, ana, sara]; end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 44: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 44

% Criptograma SOS % Diciembre 23 Calendario SM 2003-04 % Julio Castiñeira % IS + SO = SOS k =0; clear sol; for i = 1:9 for s = 1:9 if (s ~= i) is = i*10 + s; for o = 0:9 if (o ~= s) & (o ~= i) so = s*10 + o; sos = is + so; d3 = mod(floor(sos/100),10); d2 = mod(floor(sos/10),10); d1 = mod(sos,10); if (d3 == s) & (d1 == s) & (d2 == o) k = k +1; sol(k,:) = [is, so, sos]; end, end, end, end, end, end, {k, 'soluciones'} sol

Page 45: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 45

% Criptograma SOS % Diciembre 23 Calendario SM 2003-04 % Julio Castiñeira % IS * SO = SOS k =0; clear sol; for i = 1:9 for s = 1:9 if (s ~= i) is = i*10 + s; for o = 0:9 if (o ~= s) & (o ~= i) so = s*10 + o; sos = is * so; d3 = mod(floor(sos/100),10); d2 = mod(floor(sos/10),10); d1 = mod(sos,10); if (d3 == s) & (d1 == s) & (d2 == o) k = k +1; sol(k,:) = [is, so, sos]; end, end, end, end, end, end, {k, 'soluciones'} sol

Page 46: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 46

% Criptograma FELIZ AÑO Miercoles 24 % Diciembre 24 Calendario SM 2003-04 % Julio Castiñeira % BON + ANY + NOU = 2000 k=0; clear sol; for b = 1:9, for o = 1:9, if (o ~= b) for n = 1:9, if (n ~= b) & (n ~= o) bon = b*100 + o*10 + n; for a = 1:9 if (a ~= b) & (a ~= o) & (a ~= n) for y = 0:9 if (y ~= b) & (y ~= o) & (y ~= n) & (y ~= a) any = a*100 + n*10 + y; for u = 0:9 if (u ~= b) & (u ~= o) & (u ~= n) & (u ~= a) & (u ~= y) nou = n*100 + o*10 + u; test = bon + any + nou; if (test == 2000) k=k+1; sol(k,:)=[bon, any, nou]; end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 47: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 47

% Criptograma AMOR Jueves 25 % Diciembre 25 Calendario SM 2003-04 % Julio Castiñeira % DAME + MAS = AMOR k=0; clear sol; for d = 1:9, for a = 1:9, if (a ~= d) for m = 1:9, if (m ~= d) & (m ~= a) for e = 0:9 if (e ~= d) & (e ~= a) & (e ~= m) dame =d*1000 + a*100 + m*10 + e; for s = 0:9 if (s ~= d) & (s ~= a) & (s ~= m) & (s ~= e) mas = m*100 + a*10 + s; amor = dame + mas; d4 = mod(floor(amor/1000),10); d3 = mod(floor(amor/100),10); d2 = mod(floor(amor/10),10); d1 = mod(amor,10); if (d4 == a) & (d3 == m) o = d2; r = d1; if (o ~= d) & (o ~= a) & (o ~= m) & (o ~= e) & (o ~= s) if (r ~= d) & (r ~= a) & (r ~= m) & (r ~= e) & (r ~= s) & (r ~= o) k=k+1; sol(k,:)=[dame, mas, amor]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 48: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 48

% Criptograma ¿Verdadero o Falso? % Diciembre 26 Calendario SM 2003-04 % Julio Castiñeira % % FALSO + FALSO = CIERTO k=0; clear sol; for f = 1:9, for a = 0:9, if (a ~= f) for l = 0:9, if (l ~= f) & (l ~= a) for s = 0:9 if (s ~= f) & (s ~= a) & (s ~= l) for o = 0:9 if (o ~= f) & (o ~= a) & (o ~= l) & (o ~= s) falso = f*10000 + a*1000 + s*100 + o; cierto = falso*2; d6 = mod(floor(falso/100000),10); d5 = mod(floor(falso/10000),10); d4 = mod(floor(falso/1000),10); d3 = mod(floor(falso/100),10); d2 = mod(floor(falso/10),10); d1 = mod(falso,10); if (d1 == o) c = d6; i = d5; e = d4; r= d3; t = d2; if (c ~= f) & (c ~= a) & (c ~= l) & (c ~= s) & (c ~= o) if (i ~= f) & (i ~= a) & (i ~= l) & (i ~= s) & (i ~= o) & (i ~= c) if (e ~= f) & (e ~= a) & (e ~= l) & (e ~= s) & (e ~= o) & (e ~= c) & (e ~= i) if (r ~= f) & (r ~= a) & (r ~= l) & (r ~= s) & (r ~= o) & (r ~= c) & (r ~= i) & (r ~= e) if (t ~= f) & (t ~= a) & (t ~= l) & (t ~= s) & (t ~= o) & (t ~= c) & (t ~= i) & (t ~= e) & (t ~= r) k=k+1; sol(k,:)=[falso, cierto]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 49: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 49

% Criptograma PARENTESCO % Diciembre 27 Calendario SM 2003-04 % Julio Castiñeira % PADRE + PADRE = ABUELO k=0; clear sol; for p = 1:9, for a = 1:9, if (a ~= p) for d = 0:9, if (d ~= p) & (d ~= a) for r = 0:9 if (r ~= p) & (r ~= a) & (r ~= d) for e = 0:9 if (e ~= p) & (e ~= a) & (e ~= d) & (e ~= r) padre = p*10000 + a*1000 + d*100 + r*10 + e; abuelo = padre + padre; d6 = mod(floor(abuelo/100000),100); d5 = mod(floor(abuelo/10000),10); d4 = mod(floor(abuelo/1000),10); d3 = mod(floor(abuelo/100),10); d2 = mod(floor(abuelo/10),10); d1 = mod(abuelo,10); if (d6 == a) & (d3 == e) & (d6 >0) & (d6 < 10) b = d5; u = d4; l = d2; o = d1; if (b ~= p) & (b ~= a) & (b ~= d) & (b ~= r) & (b ~= e) if (u ~= p) & (u ~= a) & (u ~= d) & (u ~= r) & (u ~= e) & (u ~= b) if (l ~= p) & (l ~= a) & (l ~= d) & (l ~= r) & (l ~= e) & (l ~= b) & (l ~= u) if (o ~= p) & (o ~= a) & (o ~= d) & (o ~= r) & (o ~= e) & (o ~= b) & (o ~= u) & (o ~= l) k= k + 1; sol(k,:)=[padre, abuelo]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 50: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 50

% Criptograma DINERO % Diciembre 28 Calendario SM 2003-04 % Julio Castiñeira % SEND + MORE = MONEY k = 0; clear sol; for s = 1:9 for e = 0:9 if (e ~= s) for n = 0:9 if (n ~= s) & (n ~= e) for d = 0:9 if (d ~= s) & (d ~= e) & (d ~= n) send = s*1000 + e*100 + n*10 + d; for m = 1:9 if (m ~= s) & (m ~= e) & (m ~= n) & (m ~= d) for o = 0:9 if (o ~= s) & (o ~= e) & (o ~= n) & (o ~= d) & (o ~= m) for r = 0:9 if (r ~= s) & (r ~= e) & (r ~= n) & (r ~= d) & (r ~= m)& (r ~= o) more =m*1000 + o*100 + r*10 + e; money = send + more; d5 = mod(floor(money/10000),10); d4 = mod(floor(money/1000),10); d3 = mod(floor(money/100),10); d2 = mod(floor(money/10),10); y = mod(money,10); if (d5 == m) & (d4 == o) & (d3 == n) & (d2 == e) if (y ~= s) & (y ~= e) & (y ~= n) & (y ~= d) & (y ~= m) & (y ~= o) & (y ~= r) k = k + 1; sol(k,:) = [send, more, money]; end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 51: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 51

% Criptograma VOCALES % Diciembre 29 Calendario SM 2003-04 % Julio Castiñeira % AAAA + EEEE = UOOOU k = 0; clear sol; for a = 1:9 for e = 1:9 if (e ~= a) aaaa = a*1111; eeee = e*1111; uooou = aaaa + eeee; d5 = mod(floor(uooou/10000),100); d4 = mod(floor(uooou/1000),10); d3 = mod(floor(uooou/100),10); d2 = mod(floor(uooou/10),10); d1 = mod(uooou,10); if (d5 == d1) & (d4 == d3) & (d4 == d2) & (d5 >0) u =d5; o = d2; if (u ~= a) & (u ~= e) & (o ~= a) & (o ~= e) & (o ~= u) k = k+1; sol(k,:) = [aaaa, eeee, uooou]; end, end, end, end, end, {k, 'soluciones'} sol

Page 52: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 52

% Criptograma ABECEDARIO III % Diciembre 30 Calendario SM 2003-04 % Julio Castiñeira % AB x CD = DDD k = 0; clear sol; for a = 1:9 for b = 0:9 if (b ~= a) ab = 10*a + b; for c = 1:9 if (c ~= a) & (c ~= b) for d = 1:9 % ddd empieza por d if (d ~= a) & (d ~= b)& (d ~= c) cd = c*10 + d; ddd = ab * cd; d3 = mod(floor(ddd/100),100); d2 = mod(floor(ddd/10),10); d1 = mod(ddd,10); if (d3 == d2) & (d3 == d1) & (d3 == d) k = k+1; sol(k,:) = [ab, cd, ddd]; end, end, end, end, end, end, end, end, {k, 'soluciones'} sol

Page 53: Diciembre de 2003 - INTEF - educaLABboj.pntic.mec.es/~jcastine/Problemas_archivos/Calendario/Diciembre... · dame mas amor dame mas amor 8912 193 9105 8945 492 9437 8912 194 9106

Calendario S.M. Diciembre 2003

Julio Castiñeira Merino 53

% Criptograma AFIRMATIVO % Diciembre 31 Calendario SM 2003-04 % Julio Castiñeira % SI + SI + SI + SI + SI + SI + SI = ASI k = 0; clear sol; clear sol; for s = 1:9 for i = 0:9 if (i ~= s) si = s*10 + i; asi = si*7; test = mod(asi,100); a = mod(floor(asi/100),100); if (test == si) if (a > 0) & (a <10) & ( a ~= s) & ( a ~= i) k = k+1; sol(k,:) = [si, asi]; end, end, end, end, end, {k,'soluciones'} sol