" Sip-Pat-La" is one of the popular dice games in Taiwan.
Players roll four dice in the game and score the results. There are three conditions:
Please write a program and input the four dice numbers respectively to judge the result.
有一種坊間常見的擲骰子遊戲稱為 "18 啦 "~
其玩法是玩家擲四個骰子來算分,會產生有三種結果:
1.通殺:四 顆骰子點數均相同;
2.無意義:三顆骰子點數相同,或四顆骰子點數均不相同;
3.計分:兩個骰子相同點數,分數即為另兩個骰子點數和;若四個骰子的點數兩兩相同形成兩對,分數選擇較多點數和的那一對骰子。
Enter the four numbers of dice points per line, where the numbers range from 1 to 6.
每行輸入四個骰出的點數,輸入的點數介於 1~6 之間 。
The results of each measurement are output in order. If it is a winner-take-all, the uppercase English letter WIN is displayed. If it is meaningless, the uppercase English letter R is displayed. If the points can be calculated, show the score. No spaces are required before and after the output, and there must be a newline character at the end.
依序輸出各筆測資的結果,若是通殺,則顯示大寫英文字母 WIN , 若是無意義 ,則顯示大寫英文字母 R ,若可計算點數,則顯示最後點數 。 輸出結果前後均不需留空格 ,最後必須有換行字元。
2 3 4 5 3 4 3 4
R 8
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
沒有發現任何「解題報告」 |