chore(i8n,learn): processed translations

This commit is contained in:
Crowdin Bot
2021-02-06 04:42:36 +00:00
committed by Mrugesh Mohapatra
parent 15047f2d90
commit e5c44a3ae5
3274 changed files with 172122 additions and 14164 deletions

View File

@@ -1,25 +1,64 @@
---
id: 5900f3a21000cf542c50feb5
title: 问题54扑克手
title: 'Problem 54: Poker hands'
challengeType: 5
videoUrl: ''
forumTopicId: 302165
dashedName: problem-54-poker-hands
---
# --description--
在纸牌游戏扑克牌中一手牌由五张牌组成并按以下方式从最低到最高排名高牌最高价值牌。一对两张价值相同的牌。两对两对不同。三种类型三张相同价值的牌。直所有卡都是连续值。同花顺同一套牌的所有牌。满屋三种和一对。四种四张相同价值的牌。同花顺所有牌都是同一套牌的连续值。皇家同花顺杰克女王国王王牌同样的诉讼。卡的价值依次为2,3,4,5,6,7,8,9,10JackQueenKingAce。如果两个玩家拥有相同的排名牌则排名由最高值赢得;例如一对八个击打一对五见下面的例子1。但是如果两个级别相关例如两个玩家都有一对皇后则比较每手牌中的最高牌数参见下面的例子4;如果最高牌结合,则比较下一张最高牌,依此类推。考虑以下五手交给两名球员:
In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way:
手牌1球员2冠军1 5H 5C 6S 7S KDPair of Fives 2C 3S 8S 8D TDPair of Eights Player 2 2 5D 8C 9S JS ACHighest card Ace 2C 5C 7D 8S QHHighest card Queen Player 1 3 2D 9C AS AH ACThree Aces 3D 6D 7D TD QDFlush与钻石玩家2 4 4D 6S 9H QH QCPair of Queens最高卡九3D 6D 7H QD QSPair皇后最高卡七人玩家1 5 2H 2D 4C 4D 4SFull HouseWith Three Fours 3C 3D 3S 9S 9DFull Housewith Three Threes Player 1
<ul>
<li>High Card: Highest value card.</li>
<li>One Pair: Two cards of the same value.</li>
<li>Two Pairs: Two different pairs.</li>
<li>Three of a Kind: Three cards of the same value.</li>
<li>Straight: All cards are consecutive values.</li>
<li>Flush: All cards of the same suit.</li>
<li>Full House: Three of a kind and a pair.</li>
<li>Four of a Kind: Four cards of the same value.</li>
<li>Straight Flush: All cards are consecutive values of same suit.</li>
<li>Royal Flush: Ten, Jack, Queen, King, Ace, in same suit.</li>
</ul>
文件poker.txt包含一千个随机发给两个玩家的牌。该文件的每一行包含十张牌由一个空格分隔前五张是Player 1的牌后五张是Player 2的牌。你可以假设所有的牌都是有效的没有无效的角色或重复的牌每个牌手的牌都没有特定的顺序而且每手牌都有明显的赢家。玩家1赢了多少手牌
The cards are valued in the order: 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace.
If two players have the same ranked hands then the rank made up of the highest value wins; for example, a pair of eights beats a pair of fives (see example 1 below). But if two ranks tie, for example, both players have a pair of queens, then highest cards in each hand are compared (see example 4 below); if the highest cards tie then the next highest cards are compared, and so on.
Consider the following five hands dealt to two players:
| Hand | Player 1 | Player 2 | Winner |
| ------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------- |
| <strong>1</strong> | 5H 5C 6S 7S KD <br> Pair of Fives | 2C 3S 8S 8D TD <br> Pair of Eights | Player 2 |
| <strong>2</strong> | 5D 8C 9S JS AC <br> Highest card Ace | 2C 5C 7D 8S QH <br> Highest card Queen | Player 1 |
| <strong>3</strong> | 2D 9C AS AH AC <br> Three Aces | 3D 6D 7D TD QD <br> Flush with Diamonds | Player 2 |
| <strong>4</strong> | 4D 6S 9H QH QC <br> Pair of Queens <br> Highest card Nine | 3D 6D 7H QD QS <br> Pair of Queens <br> Highest card Seven | Player 1 |
| <strong>5</strong> | 2H 2D 4C 4D 4S <br> Full House <br> with Three Fours | 3C 3D 3S 9S 9D <br> Full House <br> with Three Threes | Player 1 |
The global array (`handsArr`) passed to the function, contains one-thousand random hands dealt to two players. Each line of the file contains ten cards (separated by a single space): the first five are Player 1's cards and the last five are Player 2's cards. You can assume that all hands are valid (no invalid characters or repeated cards), each player's hand is in no specific order, and in each hand there is a clear winner.
How many hands does Player 1 win?
# --hints--
`euler54()`应该返回376。
`pokerHands(testArr)` should return a number.
```js
assert.strictEqual(euler54(), 376);
assert(typeof pokerHands(testArr) === 'number');
```
`pokerHands(testArr)` should return 2.
```js
assert.strictEqual(pokerHands(testArr), 2);
```
`pokerHands(handsArr)` should return 376.
```js
assert.strictEqual(pokerHands(handsArr), 376);
```
# --seed--