From 9b5406d96e8d5b47fb5a4d98d82f1f60c1764848 Mon Sep 17 00:00:00 2001 From: Denis Costa Date: Tue, 26 Dec 2023 15:43:15 -0300 Subject: [PATCH] Solve Loteria in python --- solutions/beecrowd/2473/2473.py | 18 + solutions/beecrowd/2473/generate_in.sh | 52 +++ solutions/beecrowd/2473/in.txt | 600 +++++++++++++++++++++++++ solutions/beecrowd/2473/out.txt | 300 +++++++++++++ solutions/beecrowd/2473/problem.md | 30 ++ solutions/beecrowd/2473/tags.txt | 1 + 6 files changed, 1001 insertions(+) create mode 100644 solutions/beecrowd/2473/2473.py create mode 100755 solutions/beecrowd/2473/generate_in.sh create mode 100644 solutions/beecrowd/2473/in.txt create mode 100644 solutions/beecrowd/2473/out.txt create mode 100644 solutions/beecrowd/2473/problem.md create mode 100644 solutions/beecrowd/2473/tags.txt diff --git a/solutions/beecrowd/2473/2473.py b/solutions/beecrowd/2473/2473.py new file mode 100644 index 00000000..ae982e0e --- /dev/null +++ b/solutions/beecrowd/2473/2473.py @@ -0,0 +1,18 @@ +import sys + +for line in sys.stdin: + bet = set(map(int, line.split())) + lottery_result = set(map(int, input().split())) + + numbers = len(bet & lottery_result) + + if numbers == 6: + print('sena') + elif numbers == 5: + print('quina') + elif numbers == 4: + print('quadra') + elif numbers == 3: + print('terno') + else: + print('azar') diff --git a/solutions/beecrowd/2473/generate_in.sh b/solutions/beecrowd/2473/generate_in.sh new file mode 100755 index 00000000..9edb1887 --- /dev/null +++ b/solutions/beecrowd/2473/generate_in.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -euo pipefail + +TESTCASES=300 + +max_item=7 +repeated_max_item=0 +file_to_save_numbers=$(mktemp) + +function pick_number { + picked_numbers_count=$(wc -l < "${file_to_save_numbers}") + if [[ ${picked_numbers_count} -eq 6 ]] || [[ ${picked_numbers_count} -eq 0 ]]; then + picked_number=$((RANDOM % max_item + 1)) + echo "${picked_number}" > "${file_to_save_numbers}" + else + picked_number=$((RANDOM % max_item + 1)) + while grep -Fxq "${picked_number}" "${file_to_save_numbers}"; do + picked_number=$((RANDOM % max_item + 1)) + done + echo "${picked_number}" >> "${file_to_save_numbers}" + + fi + echo "${picked_number}" +} + +for _ in $(seq "${TESTCASES}"); do + for _ in {1..5}; do + picked_number=$(pick_number) + echo -n "${picked_number} " + done + picked_number=$(pick_number) + echo "${picked_number}" + + for _ in {1..5}; do + picked_number=$(pick_number) + echo -n "${picked_number} " + done + picked_number=$(pick_number) + echo "${picked_number}" + + if [[ ${max_item} -lt 10 ]] && [[ ${repeated_max_item} -lt 5 ]]; then + repeated_max_item=$((repeated_max_item + 1)) + elif [[ ${max_item} -lt 10 ]] && [[ ${repeated_max_item} -eq 5 ]]; then + repeated_max_item=0 + max_item=$((max_item + 1)) + elif [[ ${max_item} -gt 99 ]]; then + max_item=99 + else + max_item=$((max_item + 1)) + fi +done diff --git a/solutions/beecrowd/2473/in.txt b/solutions/beecrowd/2473/in.txt new file mode 100644 index 00000000..c2f912ea --- /dev/null +++ b/solutions/beecrowd/2473/in.txt @@ -0,0 +1,600 @@ +3 5 2 4 6 1 +6 5 7 2 1 3 +3 2 1 5 7 4 +1 3 5 2 4 6 +6 3 4 5 7 2 +4 3 6 7 1 5 +5 3 1 6 4 2 +1 4 5 2 7 3 +1 5 6 4 2 7 +1 4 6 7 5 2 +1 6 7 3 4 2 +3 2 5 4 1 7 +8 1 3 7 5 6 +3 6 1 5 4 8 +2 1 6 7 8 5 +2 5 7 1 3 8 +5 4 6 2 7 8 +6 2 7 5 8 4 +3 7 5 8 4 6 +4 1 7 5 8 3 +2 8 7 3 6 4 +5 2 6 8 1 7 +7 2 1 8 4 5 +7 5 2 8 3 4 +6 3 5 8 1 9 +7 4 1 9 5 6 +1 3 6 4 7 8 +9 3 6 8 1 2 +5 4 1 8 2 9 +9 7 1 8 5 4 +2 8 1 9 7 4 +5 2 4 9 1 7 +8 9 7 6 3 1 +6 1 5 7 4 3 +3 9 2 7 8 4 +8 1 6 3 7 5 +10 8 7 5 2 1 +10 4 5 3 9 8 +8 1 4 3 11 10 +7 1 9 8 10 11 +7 8 11 6 1 2 +1 5 11 7 12 6 +6 4 11 8 7 12 +3 4 13 12 9 5 +4 10 8 3 5 13 +13 10 11 3 14 7 +3 11 13 10 1 6 +3 4 11 14 2 12 +5 15 3 9 7 13 +14 8 3 5 12 7 +16 1 2 14 15 5 +17 11 16 4 14 6 +3 6 12 11 16 15 +14 9 12 8 3 2 +1 2 5 10 13 6 +6 19 2 4 8 15 +3 1 19 12 8 20 +1 10 4 8 16 3 +8 9 17 7 10 19 +3 16 13 15 18 9 +2 4 19 17 11 18 +1 5 3 21 9 6 +11 5 13 2 15 12 +23 14 22 4 16 3 +3 7 5 9 11 18 +2 17 15 21 13 12 +23 11 22 16 20 12 +2 5 6 14 3 12 +2 11 5 22 3 14 +14 24 25 3 17 9 +13 6 9 3 5 17 +1 13 9 14 16 20 +8 19 16 12 9 3 +28 18 17 13 8 20 +25 14 5 3 12 6 +12 10 28 19 9 29 +11 18 21 10 2 30 +19 22 30 13 7 18 +29 16 17 18 28 7 +1 20 14 18 23 13 +16 6 29 23 28 32 +16 20 19 14 8 28 +21 5 15 1 9 18 +8 9 7 3 23 25 +4 16 9 3 7 2 +2 3 6 12 30 19 +15 16 27 2 31 14 +8 7 21 14 9 12 +8 15 32 2 6 27 +19 15 1 33 6 17 +24 2 14 18 26 7 +18 19 13 6 8 36 +36 3 1 32 6 30 +38 16 7 33 8 6 +16 35 9 25 32 26 +1 22 12 4 20 30 +4 32 8 16 6 36 +2 28 24 10 9 22 +1 8 21 38 20 40 +31 39 7 4 23 11 +7 30 12 40 25 17 +39 9 2 41 42 3 +30 25 36 35 33 12 +19 34 1 41 13 7 +8 12 36 33 44 37 +29 19 36 3 14 17 +33 27 16 18 14 25 +19 41 33 23 38 45 +4 2 45 25 21 16 +34 3 21 5 13 6 +24 21 40 47 14 45 +41 47 30 39 37 7 +23 20 40 38 19 36 +5 19 13 48 20 45 +36 23 29 41 2 6 +4 45 46 17 37 38 +4 48 21 12 29 27 +40 4 27 15 31 35 +30 27 28 34 51 40 +24 31 18 34 1 45 +33 9 36 48 51 50 +4 1 40 48 18 49 +7 1 38 53 4 52 +1 34 49 40 18 16 +13 36 17 4 27 47 +10 50 33 44 16 22 +2 15 17 8 34 24 +13 7 10 54 53 39 +32 19 53 17 37 30 +46 36 51 41 25 31 +4 36 3 11 20 32 +42 53 6 36 35 31 +1 46 14 48 5 50 +41 47 4 38 57 52 +39 18 33 48 40 26 +38 25 12 26 47 23 +38 53 46 36 55 40 +33 7 36 50 20 55 +51 45 12 34 39 35 +17 15 55 39 26 6 +21 30 3 43 2 8 +33 31 57 2 20 36 +59 51 17 25 43 39 +51 35 55 14 7 26 +59 16 30 7 54 47 +32 22 39 18 53 21 +50 45 5 34 14 27 +43 50 9 33 20 58 +21 10 2 59 66 45 +22 59 50 21 19 64 +29 60 37 59 2 19 +46 37 13 50 14 23 +30 65 51 42 54 61 +9 30 23 61 38 51 +61 26 63 30 39 6 +49 15 27 63 46 69 +17 15 40 9 51 65 +39 59 32 5 11 17 +44 60 16 18 34 39 +53 7 13 18 19 28 +37 54 1 18 51 66 +57 41 11 52 18 5 +22 66 33 25 68 5 +58 53 38 62 2 36 +66 15 29 53 34 18 +58 30 53 62 17 9 +52 43 47 7 54 41 +20 18 8 70 15 12 +28 12 59 41 49 43 +31 15 54 65 23 69 +61 48 1 28 76 22 +75 21 2 17 25 9 +12 45 6 11 7 54 +38 10 24 29 16 50 +27 9 17 50 62 4 +41 47 78 14 44 29 +5 8 9 70 26 41 +33 69 6 1 13 62 +35 8 48 6 66 20 +25 35 73 12 8 67 +26 23 51 39 31 54 +62 74 57 2 70 30 +11 76 52 81 56 61 +28 67 50 78 76 16 +7 52 29 6 56 39 +44 18 54 33 61 35 +64 4 31 81 39 1 +36 67 62 15 30 69 +82 10 46 34 80 61 +75 63 81 51 70 80 +85 14 10 29 6 79 +18 61 35 78 39 10 +78 42 79 80 67 61 +45 15 68 22 33 52 +34 47 83 49 70 63 +13 83 8 42 37 47 +74 59 5 53 8 47 +38 78 79 83 11 30 +1 37 23 53 62 30 +49 41 40 75 78 89 +86 23 55 65 24 88 +83 53 57 66 27 76 +58 75 77 80 12 9 +11 80 74 29 22 18 +28 41 66 53 87 60 +63 38 62 33 43 68 +64 6 94 28 7 80 +24 21 35 47 53 14 +65 51 35 57 77 54 +96 80 51 70 18 53 +79 76 66 56 95 24 +32 6 50 38 18 31 +8 57 48 74 26 95 +52 45 81 5 97 74 +28 47 33 81 39 6 +88 25 19 81 9 94 +83 9 65 20 67 8 +27 99 68 18 97 58 +23 81 47 4 65 60 +21 25 70 81 97 26 +15 56 7 27 24 92 +89 79 9 50 63 87 +53 46 80 40 94 91 +67 31 36 63 88 78 +84 37 48 92 16 53 +54 52 46 65 85 6 +84 31 74 58 14 21 +42 18 6 56 14 58 +53 82 89 80 63 84 +54 17 81 35 5 36 +80 47 94 13 96 40 +26 14 96 33 34 42 +35 49 99 85 6 1 +56 42 12 53 79 93 +10 93 51 61 96 42 +77 1 89 64 70 10 +45 18 69 96 77 32 +51 91 79 75 17 9 +72 96 67 43 34 82 +11 63 1 26 75 31 +14 90 50 40 28 12 +15 13 69 79 66 47 +86 38 94 43 84 49 +33 58 9 43 56 34 +93 66 84 75 24 48 +16 51 3 17 53 77 +75 76 62 9 29 43 +28 39 47 38 29 13 +20 73 19 100 28 48 +23 57 2 9 44 31 +17 58 7 28 83 10 +28 47 41 75 20 54 +71 79 29 50 92 75 +64 98 67 95 49 76 +41 27 93 1 61 18 +12 9 29 10 4 53 +1 35 10 21 59 67 +85 34 52 26 38 72 +31 69 32 17 89 75 +60 91 37 16 24 95 +59 100 13 43 41 68 +32 100 94 12 13 51 +7 29 12 76 54 35 +57 67 39 85 65 81 +94 8 87 53 57 83 +76 23 79 50 35 9 +89 76 90 57 50 13 +60 51 63 94 95 80 +14 55 28 95 66 99 +94 13 17 42 74 21 +39 80 67 79 34 61 +66 15 37 85 65 9 +38 2 48 40 68 31 +25 44 42 65 72 7 +79 8 45 39 11 85 +97 19 91 1 18 57 +42 84 61 9 36 32 +92 99 32 20 5 45 +88 94 4 27 75 9 +69 2 27 5 12 35 +76 25 7 90 64 30 +46 36 70 53 11 47 +48 54 27 90 34 93 +16 21 75 26 97 43 +26 78 72 20 46 73 +34 77 74 43 96 90 +66 5 41 99 82 71 +75 66 15 48 57 29 +60 69 49 20 91 85 +17 34 11 93 15 19 +59 88 2 76 18 93 +36 91 67 47 70 75 +93 25 100 27 92 53 +33 10 96 35 94 45 +63 57 89 36 81 88 +39 4 71 78 25 69 +51 61 58 99 12 77 +26 73 94 96 65 5 +81 12 10 14 21 31 +18 84 16 32 48 10 +93 85 89 48 6 36 +99 60 58 73 87 28 +56 5 34 59 20 35 +77 60 57 36 51 89 +40 36 89 35 62 78 +35 12 23 82 4 55 +64 43 58 21 47 94 +1 38 5 9 70 78 +12 41 39 5 4 16 +45 70 47 73 35 62 +43 39 66 14 53 90 +37 36 44 23 4 56 +52 5 40 57 100 71 +6 94 5 17 76 13 +15 82 17 49 37 55 +19 80 64 15 45 34 +97 20 65 73 89 16 +49 87 29 73 15 4 +64 72 53 99 78 44 +9 44 60 66 26 8 +5 97 34 28 62 100 +1 98 82 4 95 87 +66 25 91 56 6 85 +2 43 33 50 58 70 +55 65 82 41 4 94 +53 67 70 59 92 4 +89 96 74 65 32 1 +91 51 45 2 48 43 +22 6 39 49 70 45 +75 12 87 23 68 7 +51 47 57 4 33 31 +71 4 36 2 27 19 +20 13 81 25 35 79 +94 85 14 6 98 9 +91 48 5 90 22 32 +69 42 25 49 12 83 +10 39 28 20 59 40 +1 59 64 94 19 98 +95 94 17 97 29 83 +13 31 95 55 44 51 +65 85 12 54 17 70 +94 79 18 6 55 16 +35 62 94 17 52 74 +79 25 68 65 27 53 +11 41 68 56 94 26 +11 32 41 67 19 96 +14 69 89 25 68 13 +57 55 67 95 37 84 +22 15 16 60 82 6 +5 89 78 88 20 81 +46 39 54 26 28 10 +99 54 10 41 70 57 +65 7 18 54 11 39 +58 96 75 71 34 27 +70 11 29 22 96 74 +53 51 16 91 1 96 +29 64 16 49 34 82 +99 90 1 70 71 81 +51 68 25 75 49 76 +86 10 84 61 12 23 +91 88 1 89 46 66 +20 61 8 95 56 11 +18 27 64 42 5 37 +98 78 13 61 28 87 +51 45 73 52 35 66 +46 91 7 98 73 50 +79 30 59 60 25 81 +70 20 13 58 90 89 +92 71 99 50 22 86 +1 75 35 32 7 78 +79 26 20 50 94 2 +69 40 26 50 66 76 +96 24 88 56 28 58 +52 85 100 32 3 80 +15 68 95 64 51 4 +94 92 59 4 2 64 +34 98 68 54 5 84 +77 60 75 99 25 96 +84 75 31 54 46 53 +59 11 56 82 40 77 +18 51 65 31 6 28 +94 80 17 27 59 53 +90 22 96 79 72 88 +11 73 13 23 96 52 +94 74 45 25 78 98 +78 13 83 72 71 70 +17 82 93 54 81 1 +57 62 29 42 58 25 +14 12 61 65 35 97 +89 76 92 95 38 51 +53 22 27 42 66 1 +63 56 73 21 75 34 +53 56 66 91 30 60 +68 8 41 31 29 96 +70 23 27 66 72 9 +70 51 72 18 81 26 +41 21 58 20 87 85 +87 7 6 70 40 17 +9 10 15 92 17 23 +83 19 96 40 37 13 +80 11 75 70 25 30 +84 26 36 32 60 33 +83 7 82 44 40 43 +86 10 58 96 24 7 +32 58 57 26 10 99 +21 81 37 26 90 7 +28 63 11 37 75 35 +61 29 47 40 43 79 +25 41 67 85 9 19 +62 15 18 58 94 87 +20 69 68 28 57 3 +87 65 51 99 27 42 +14 81 2 9 52 7 +62 4 75 50 70 41 +25 29 86 3 69 92 +93 35 42 44 20 30 +86 63 77 67 93 48 +80 69 73 54 70 97 +89 61 32 7 21 63 +54 42 94 14 3 23 +3 29 25 100 1 62 +92 99 86 81 35 53 +98 18 51 22 6 10 +52 17 16 90 54 2 +22 60 77 64 40 74 +92 32 17 97 35 90 +78 77 65 17 10 49 +68 84 66 10 45 34 +45 73 17 47 41 74 +61 37 10 14 25 26 +1 84 30 83 71 31 +76 49 55 87 32 6 +94 96 88 27 59 90 +76 73 27 12 57 1 +75 37 34 23 63 26 +1 30 38 98 23 93 +45 15 56 7 22 43 +78 31 17 60 36 56 +49 67 91 51 21 38 +40 42 4 11 32 65 +15 57 33 11 32 47 +16 92 100 24 64 39 +96 69 85 61 22 21 +87 10 18 84 7 46 +26 25 11 18 55 48 +58 50 66 29 37 97 +14 19 59 3 49 97 +71 77 85 61 98 38 +35 14 3 36 62 81 +19 58 73 90 37 34 +10 1 47 19 71 45 +9 49 92 28 54 31 +55 46 80 86 70 82 +26 66 34 46 14 83 +8 57 16 29 93 31 +92 83 87 7 40 56 +65 35 60 93 61 63 +51 93 29 7 66 6 +87 6 42 72 47 62 +94 1 61 25 38 40 +84 70 53 36 78 7 +38 13 88 94 9 39 +54 60 81 26 18 52 +99 8 4 89 51 53 +31 43 26 34 7 41 +92 72 71 80 40 30 +12 65 94 27 63 80 +88 86 72 14 35 48 +56 13 91 10 23 18 +85 86 56 92 58 69 +24 36 46 31 42 96 +78 11 24 7 32 22 +25 22 9 10 81 39 +72 7 66 43 8 70 +73 65 35 80 93 48 +60 6 20 1 34 35 +90 65 53 71 29 55 +60 32 55 44 65 10 +46 59 66 10 65 43 +62 80 28 15 88 75 +55 11 35 71 25 27 +28 12 52 44 86 42 +16 8 43 9 65 95 +63 98 62 38 51 90 +3 25 11 80 22 6 +9 35 90 74 25 6 +71 91 7 43 47 48 +81 74 48 40 39 32 +65 60 81 34 25 40 +43 62 9 48 79 74 +67 50 38 57 5 76 +2 69 48 53 18 16 +66 38 60 39 49 99 +63 64 87 1 55 49 +92 84 36 44 13 53 +60 54 28 35 23 99 +96 16 50 57 94 51 +69 68 65 43 37 35 +48 79 71 20 92 57 +23 11 97 25 89 10 +25 84 73 19 78 2 +29 100 31 1 43 91 +69 97 80 52 10 66 +64 63 81 52 90 78 +21 15 14 6 8 99 +16 12 23 22 65 25 +4 17 7 62 37 92 +56 41 81 7 24 14 +57 50 28 53 100 17 +49 14 65 30 55 89 +50 40 59 85 75 73 +27 7 84 58 72 54 +76 22 5 9 19 40 +55 23 32 83 40 59 +20 2 10 63 56 22 +5 32 63 36 7 17 +71 91 19 77 21 72 +28 83 44 18 64 93 +58 85 20 3 24 72 +4 13 57 99 30 85 +13 85 9 93 33 18 +78 98 62 53 6 46 +48 74 46 54 36 91 +86 24 87 88 12 43 +33 17 84 73 65 24 +76 43 41 8 100 46 +63 23 60 59 99 54 +70 59 12 72 46 61 +95 65 94 91 46 23 +12 49 88 11 48 67 +27 52 97 57 66 16 +90 75 84 83 80 93 +98 8 44 81 9 66 +36 52 55 14 7 27 +60 78 24 45 90 15 +11 45 53 34 71 58 +18 26 6 71 72 81 +68 52 78 54 56 46 +47 80 25 46 44 19 +64 58 73 23 9 84 +33 57 66 53 84 49 +9 95 1 5 69 2 +34 46 73 48 63 59 +57 40 29 63 93 41 +64 98 99 89 92 59 +8 49 16 83 38 35 +48 52 70 64 72 21 +43 58 32 39 9 63 +48 5 31 75 81 71 +94 56 88 35 96 66 +83 45 95 66 26 77 +84 44 82 97 67 3 +72 8 98 25 14 7 +63 95 53 27 5 17 +20 48 16 82 6 32 +91 11 43 31 84 79 +28 35 21 51 61 24 +41 91 74 13 90 16 +64 13 11 25 94 52 +6 17 89 15 78 22 +34 52 18 96 65 84 +97 10 32 80 4 63 +89 41 52 48 90 12 +45 26 72 44 38 27 +90 65 67 2 32 5 +24 82 58 92 7 97 +39 94 29 95 31 55 +73 94 85 35 6 36 +53 17 19 67 86 10 +95 80 51 87 11 5 +48 75 2 27 90 32 +18 36 75 45 70 15 +70 48 98 81 28 26 +12 17 39 24 67 14 +55 41 32 67 31 56 +36 25 45 28 77 60 +98 95 29 21 16 71 +60 49 41 3 73 6 +21 60 88 72 86 36 +46 13 87 3 2 71 +36 99 9 56 91 51 +87 98 19 30 37 100 +26 10 35 96 37 67 +85 65 28 98 26 50 +21 55 78 1 17 56 +40 85 10 34 8 1 +82 29 42 25 59 18 +90 6 91 62 17 84 +2 35 60 31 81 97 +78 56 37 100 65 61 +21 4 74 48 27 15 +38 4 22 11 6 66 +88 19 30 10 85 4 +63 7 67 77 1 61 +52 76 96 57 67 13 +57 92 81 46 87 70 +44 55 8 64 74 76 +54 48 97 45 23 92 +85 89 11 46 8 48 +20 47 36 53 8 2 diff --git a/solutions/beecrowd/2473/out.txt b/solutions/beecrowd/2473/out.txt new file mode 100644 index 00000000..8cb71d4b --- /dev/null +++ b/solutions/beecrowd/2473/out.txt @@ -0,0 +1,300 @@ +quina +quina +quina +quina +sena +quina +quina +quina +sena +quina +quadra +quina +quadra +quadra +quina +quina +quadra +terno +terno +quadra +quadra +azar +terno +azar +terno +azar +azar +azar +terno +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +terno +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar +azar diff --git a/solutions/beecrowd/2473/problem.md b/solutions/beecrowd/2473/problem.md new file mode 100644 index 00000000..02175f33 --- /dev/null +++ b/solutions/beecrowd/2473/problem.md @@ -0,0 +1,30 @@ +https://www.beecrowd.com.br/judge/en/problems/view/2473 + +# Loteria + +Flavinho sabe que a chance de ganhar na loteria é bem pequena. Ele gosta muito +de estudar probabilidade! Mas, justamente por entender de probabilidades, +Flavinho segue o ditado, “quem não arrisca, não petisca!”, e faz um jogo toda +semana. + +Na loteria preferida dele, o jogador aposta seis números entre 1 e 99. No +sorteio, também são escolhidos seis números ganhadores entre 1 e 99. Quem acerta +3, 4, 5 ou 6 números ganha como prêmio, respectivamente, um “terno”, uma +“quadra”, uma “quina” ou uma “sena”. + +Nesta tarefa, você deve escrever um programa que diga qual foi o prêmio que +Flavinho ganhou, dados os seis números que ele apostou e os seis números que +foram sorteados. + +## Entrada + +A entrada consiste de duas linhas apenas. Na primeira linha são dados seis +números inteiros distintos entre 1 e 99, representando a aposta do Flavinho. A +segunda linha contém os seis números inteiros distintos sorteados. + +## Saída + +Seu programa deve imprimir uma linha contendo uma palavra: “terno”, “quadra”, +“quina” ou “sena”; caso Flavinho tenha acertado, respectivamente, 3, 4, 5, ou 6 +números. Caso ele tenha acertado menos do que 3 números, imprima a palavra +“azar”. diff --git a/solutions/beecrowd/2473/tags.txt b/solutions/beecrowd/2473/tags.txt new file mode 100644 index 00000000..e07a45e3 --- /dev/null +++ b/solutions/beecrowd/2473/tags.txt @@ -0,0 +1 @@ +ad-hoc