"Blackjack Anyone?"
Given an input file containing 1000 random blackjack hands between 3 players (here: blackjack.txt ), calculate the number of blackjacks encountered for any player in all games.
A blackjack is defined as an Ace of any suit and a 10 valued card (Jack, Queen ,King or 10) of any suit.
The input file looks like this: (as an example)
4H 5C AD JH 9C 10H
This means that player one has a 4 of hearts and a 5 of clubs; player 2 has an Ace of Diamonds and a Jack of Hearts (which counts as a blackjack); player 3 has a 9 of Clubs and a 10 of Hearts.
For the purpose of this problem, it is known that there is a standard 52 card deck which is reshuffled for each new game.
Now this was a fun one... I recommend going slow and double checking everything, first get a copy of the file, then tear apart into hands, then check each hand to see if matches the rules for blackjack - If so then add to a counter :D
Awnser:
() ( ( ( (content="width=device-width, initial-scale=1") ( (content='noindex, follow') () ((wp-custom-logo wp-theme-kubio">) ( ( (class="wp-block wp-block-kubio-header) ( position-relative) ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-395"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-396"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-397"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-398"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-399"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-400"> ( (wp-block-kubio-menu-offscreen )
(position-relative wp-block-kubio-menu-offscreen__container) ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-395"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-396"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-397"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-398"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-399"> ( (class="menu-item menu-item-type-taxonomy) (menu-item-object-category menu-item-400"> ( (wp-block-kubio-row )
(position-relative wp-block-kubio-row__container) ((wp-block-kubio-hero )
(position-relative wp-block-kubio-hero__outer) ((function ()) (// forEach) (if (!NodeList.prototype.forEach)) (NodeList.prototype.forEach =) (function (callback)) (for (var) (i =) (0; i) (callback.call(this, this.item(i));) (var navigation) (= document.querySelector('[data-colibri-navigation-overlap="true"],) (if (navigation)) (var els) (= document) (if (els.length)) (els.forEach(function (item)) (item.style.paddingTop =) (navigation.offsetHeight +) ((wp-block-kubio-row )
(position-relative wp-block-kubio-row__container) ((wp-block-kubio-footer )
(position-relative wp-block-kubio-footer__container) ( (class="menu-item menu-item-type-post_type) (menu-item-object-page menu-item-210"> ( (class="menu-item menu-item-type-post_type) (menu-item-object-page menu-item-211"> () () ( (src="https://cstutoringcenter.com/wp-includes/js/dist/i18n.min.js?ver=5e580eb46a90c2b997e6" id="wp-i18n-js">) ( (/* (wp.i18n.setLocaleData( {) ('text direction\u0004ltr':) ([ 'ltr') (/* ]]>) ( (defer src="https://cstutoringcenter.com/wp-content/plugins/kubio-pro/build/scripts/index.js?ver=bb781e554637419a0f02") ( (defer src="https://cstutoringcenter.com/wp-content/plugins/kubio-pro/build/frontend/index.js?ver=4ef56b09ba2db925062c") ( (/* ("use strict";var) (_createClass=function(){function defineProperties(target,props){for(var) (i=0;i (/* ]]>) ( (/* (var RocketPreloadLinksConfig) (= {"excludeUris":"\/(?:.+\/)?feed(?:\/(?:.+\/?)?)?$|\/(?:.+\/)?embed\/|\/(index.php\/)?(.*)wp-json(\/.*|$)|\/refer\/|\/go\/|\/recommend\/|\/recommends\/","usesTrailingSlash":"","imageExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php","fileExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php|html|htm","siteUrl":"https:\/\/cstutoringcenter.com","onHoverDelay":"100","rateThrottle":"3"};) (/* ]]>) ( (/* ((function() {) ("use strict";var) (r="function"==typeof Symbol&&"symbol"==typeof) (Symbol.iterator?function(e){return typeof) (/* ]]>) ( (/* (var rocket_lazyload_css_data) (= {"threshold":"300"};) (/* ]]>) ( (/* (!function o(n,c,a){function) (u(t,e){if(!c[t]){if(!n[t]){var r="function"==typeof) (require&&require;if(!e&&r)return r(t,!0);if(s)return) (/* ]]>) ( (async src="https://cstutoringcenter.com/wp-content/plugins/wp-rocket/assets/js/lazyload/17.8.3/lazyload.min.js">