Poker de Daus a Temeria


Submit solution

Points: 2 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type
Sense Bucles
Category
Primers Passos
Allowed languages
Bash, C#, C++, Haskell, Java, Kotlin, PHP, Python

En el videojoc The Witcher hi ha un petit minijoc anomenat Poker de Daus. Farem una petita variant d’aquest joc.

Tindrem 4 daus. Hem de comparar si hi ha alguna parella, algun trio o algún poker (els 4 iguals)

Pista: Les combinacions possibles si tens 4 daus a,b,c i d són: Parelles: ab, ac, ad, bc, bd, cd Trios: abc, abd, acd, bcd Poker: abcd

Entrada

Cada cas és d'una línea, i conté 4 números, els 4 daus, entre 1 i 6. No és necessari mostrar per exemple “PARELLA de 4s”, només “PARELLA” No consideris dobles parelles ni escales.

Sortida

Mostrarem per pantalla “RES”, “PARELLA”, “TRIO” o “POKER” depenent del que hagi passat.

Exemples

Entrada Sortida
1 2 3 4 RES
1 2 3 1 PARELLA
1 3 3 3 TRIO
4 4 4 4 POKER

Comments


  • 1
    ErikM  commented on Sept. 25, 2024, 4:01 p.m. edit 3

    Let's go gambling! Aw dangit (12 intentos)


    • 0
      Grau  commented on Sept. 30, 2024, 5:08 p.m.

      Let's be financially responsive! Oh dang it! Oh dang it! Oh dang it!


  • -1
    AlexUoo  commented on Oct. 29, 2020, 4:36 p.m.

    un dado tendria que ser random estoy muy sad marc.


    • 0
      aalmirante27  commented on Oct. 7, 2024, 5:27 p.m.

      Ah vale, no sabia que eras pro. Te dejo algo random como recompensa por haberlo resuelto

      ███████▓█████▓▓╬╬╬╬╬╬╬╬▓███▓╬╬╬╬╬╬╬▓╬╬▓█ ████▓▓▓▓╬╬▓█████╬╬╬╬╬╬███▓╬╬╬╬╬╬╬╬╬╬╬╬╬█ ███▓▓▓▓╬╬╬╬╬╬▓██╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ████▓▓▓╬╬╬╬╬╬╬▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ███▓█▓███████▓▓███▓╬╬╬╬╬╬▓███████▓╬╬╬╬▓█ ████████████████▓█▓╬╬╬╬╬▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬█ ███▓▓▓▓▓▓▓╬╬▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ████▓▓▓╬╬╬╬▓▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ███▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ █████▓▓▓▓▓▓▓▓█▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ █████▓▓▓▓▓▓▓██▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ █████▓▓▓▓▓████▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ ████▓█▓▓▓▓██▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ ████▓▓███▓▓▓▓▓▓▓██▓╬╬╬╬╬╬╬╬╬╬╬╬█▓╬▓╬╬▓██ █████▓███▓▓▓▓▓▓▓▓████▓▓╬╬╬╬╬╬╬█▓╬╬╬╬╬▓██ █████▓▓█▓███▓▓▓████╬▓█▓▓╬╬╬▓▓█▓╬╬╬╬╬╬███ ██████▓██▓███████▓╬╬╬▓▓╬▓▓██▓╬╬╬╬╬╬╬▓███ ███████▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬████ ███████▓▓██▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓████ ████████▓▓▓█████▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█████ █████████▓▓▓█▓▓▓▓▓███▓╬╬╬╬╬╬╬╬╬╬╬▓██████ ██████████▓▓▓█▓▓▓╬▓██╬╬╬╬╬╬╬╬╬╬╬▓███████ ███████████▓▓█▓▓▓▓███▓╬╬╬╬╬╬╬╬╬▓████████ ██████████████▓▓▓███▓▓╬╬╬╬╬╬╬╬██████████ ███████████████▓▓▓██▓▓╬╬╬╬╬╬▓███████████