Arun and Arya are very good friends. They started playing a card game. In this game, each of them will have a set of cards.
Each card consists of a number and a symbol. Each player will have a set of cards and that set consist 16 cards and it has 4 types of cards named as (R, Q, P, S) and there will be 4 cards of each type numbered as (If card symbol like R then card contains details like R 1, R 2, R 3, R 4). So they started playing the game.
Initially, cards are flipped and shuffled. At the time each player can flip one card. According to the rules of card game, Score of each player depending on card types that they have got(for card R total sum of R cards will increase by multiplying by 10, similarly for Q it’s 10 and for P it’s 7 and S it’s 5), and player who got the highest score is the winner.
Find the winner of the card game.
Input format
1st input is an integer indicates a number of times each player can flip the card. (1>=n<=16).
The next line of input indicates details of the flipped card, like card name[should be b/w[R, Q, P, S] and card number[b/w 1-4].
(follow the sample input and output format).
Output format
The output consists of the total scores and status of the game.
Refer to sample input and output for formatting details.
Note: All text in bold corresponds to the input and the rest corresponds to output [Refer to sample input and output format].
Sample Input and Output 1:
Enter number of time player can flip the card
3
Arun flip the card
R
1
Arya flip the card
S
2
Arun flip the card
P
1
Arya flip the card
R
3
Arun flip the card
R
4
Arya flip the card
P
3
Total scores 57 61
Arya won the game
3
Arun flip the card
R
1
Arya flip the card
S
2
Arun flip the card
P
1
Arya flip the card
R
3
Arun flip the card
R
4
Arya flip the card
P
3
Total scores 57 61
Arya won the game
Sample Input and Output 2:
Enter number of time player can Flip the card
2
Arun flip the card
R
2
Arya flip the card
Q
2
Arun flip the card
P
3
Arya flip the card
S
3
Total scores 41 35
Arun won the game
2
Arun flip the card
R
2
Arya flip the card
Q
2
Arun flip the card
P
3
Arya flip the card
S
3
Total scores 41 35
Arun won the game
Sample Input and Output 3:
Enter number of time player can flip the card
2
Arun flip the card
R
2
Arya flip the fard
P
3
Arun flip the card
P
3
Arya flip the card
Q
2
Total scores 41 41
Game tied
2
Arun flip the card
R
2
Arya flip the fard
P
3
Arun flip the card
P
3
Arya flip the card
Q
2
Total scores 41 41
Game tied
Solution:
print("Enter number of time player can flip the card")
n=int(input())
a=[]
b=[]
for i in range(n):
print("Arun flip the card")
a1=[]
x=input()
a1.append(x)
y=int(input())
a1.append(y)
a.append(a1)
print("Arya flip the card")
b1=[]
x1=input()
b1.append(x1)
y1=int(input())
b1.append(y1)
b.append(b1)
s1,s2=0,0
for i in a:
if i[0]=='P':
s1+=i[1]*7
elif i[0]=='Q':
s1+=i[1]*10
elif i[0]=='R':
s1+=i[1]*10
elif i[0]=='S':
s1+=i[1]*5
for i in b:
if i[0]=='P':
s2+=i[1]*7
elif i[0]=='Q':
s2+=i[1]*10
elif i[0]=='R':
s2+=i[1]*10
elif i[0]=='S':
s2+=i[1]*5
print("Total scores {} {}".format(s1,s2))
if s1>s2:
print("Arun won the game")
elif s2>s1:
print("Arya won the game")
else:
print("Game tied")
Hello my name is Scott Mcall. I want to use this medium to share to you guys about how my life changed for the better after meeting good hackers, I got $15,000USD while working with them. They are really efficient and reliable, they perform various hack such as.
ReplyDeleteBLANK ATM CARD
PAYPAL HACK TRANSFER
WESTERN UNION HACK
MONEY HACK
BITCOIN INVESTMENT
Please if you are interested in any of this, contact them via Jaxononlinehackers@gmail.com
WhatsApp: +1 (219)2714465
Contact them today and be happy
Nice post! This is a very nice thing that I will definitely come back to more times this year! Thanks for the informative post.
ReplyDeleteMega City Missions - Play free online!
Cyber Racer Battles ||Smart Pin Ball ||Pixel Zombies || Impostor Punch || Prison Escape 3D
I strongly recommend the service of a GREAT Hacker to you and his email is so I have used him quite a number of times and he has never disappointed me.
ReplyDeleteHe does all types of mobile hacks, get unrestricted and unnoticeable access to your partner/spouse, Skype, Facebook Account, Email(s), Whtsapp, Instagram, Text messages, Snap Chat, Hang out, Twitter, Hangout, Bank accounts loading, Credit cards top up, office files, Boost credit scores to 750 plus with all credit bureaus etc
Contact this Great Computer wizard on WhitehatstechATgmailDOTcom or WhitehatspytechATcyberservicesDOTcom
HAVE YOU LOST YOUR MONEY TO BINARY OPTION SCAM OR ANY ONLINE SCAM WHATSOEVER?.DO YOUR DESIRE CREDIT REPAIR[EQUIFAX, EXPERIAN, TRANSUNION? WELL, YOU HAVE FOUND REDEMPTION IN ASORE CORP.
ReplyDeleteAsore Corp is a group of multinational Hacker's, an affiliate of Evil Corp. We make sure by all means necessary that our clients get the best of services on a🔐PAYMENT AFTER JOB IS DONE BASIS✅. Rather than send money and trust a criminal to fulfill your deal, you can make sure the job is done before WORKMANSHIP is paid for. You'll get excellent customer service.
That's a 100% guarantee. Our Cyber security Technicians are on standby 24/7 to receive your job requests.
⚠️ BEWARE OF FRAUDSTARS looking to hoax.
if you have been a VICTIM, contact : ✉️cyberprecinct@gmail.com for directives.
Here, it's always a win for you.
🔸OUR SERVICES🔸
➡️Binary Option funds recovery
➡️Social media hack
➡️Recovery of loan scam
➡️Credit repair (Equifax,Experian,Transunion)
➡️Email hack
➡️College score upgrade
➡️Android & iPhone Hack
➡️Website design
➡️Website hack
And lots more.
DISCLAIMER: Asore Cyber Corp accepts no responsibility for any information,previously given to anybody by clients on as regarding the job. Asore Cyber Corp will not distribute contact information collected on any hacking job other than in the Asore corps Hacker's listings themselves, and will not sell contact information to third parties.
CONTACT INFO:
📧 asorehackcorp@gmail.com
cyberprecinct@gmail.com
Copyright ©️
Asore Cyber Corp 2021.
All rights reserved.
I know of a group of private investigators who can help you with they are also hackers but prefer to be called private investigators They can help with your bitcoin issues,low credit score,phone hack,clear criminal record,recover stolen or lost files etc and they leave there clients happy doing business with them.
ReplyDeleteContact +1 (984) 733‑3673
WhatsApp +1 (984) 733‑3673
Telegram +1 (984) 733‑3673
Premiumhackservices@gmail.com
This comment has been removed by the author.
ReplyDeleteChase2Learn: Home Page https://www.chase2learn.com
ReplyDeleteA popular programming and development blog. Here you can learn C, C++, Java, Python, Software engineering, ML, AI, Software Developers, Programmers many
Are you having a very low FICO score, and are desperate for a perfect and urgent fix? I confidently recommend CYBER CREDIT GURU. They cleared all negatives, late payments and collections from my credit report and boosted my FICO score from 505 to 800 excellent score, across all three bureaus within four days. CYBER CREDIT GURU does a very neat and perfect job without leaving any form of trace behind. You can give them a trial today and I bet you will never regret it. Contact: CYBERCREDITGURU (AT) GMAIL DOT COM or phone/text: +1 (650) 439 0624
ReplyDeleteI can gladly thank WIZARD GHOST HACKER for the magic job they did for me when I was very frustrated and about ending my life in the last month of 2021 the online investment I did was a scam zone since 2021 is ending I decide to withdraw my funds I deposited through USDT for the trading of BTC a total amount of 97,456 $ the site denial me of withdrawing the money I invested and I still have profit on the site wallet so I was so devasted because that was my only hope of money and that was my only savings so I search for online for the best Wizard and I got a lot of lists and I selected 3 different Wizard and contact them via email and all asked for an upfront payment so a friend gave me a contact of another Wizard who instantly asked for only details and information within 24 hours he was done recovering my funds thou it was not complete but I was able to get back 81,750 $ he is the best Wizard give him a try and have your problem solve via: GHOSTCHAMPIONWIZARD@GMAIL.COM
ReplyDeleteHOW I RECOVERED MY LOST FUNDS FROM CRYPTOCURRENCY SCAMMERS.
ReplyDeletewww.recoveryprecinct.com
Hello ! My name is Sarah O’Brian, I am a chartered accountant and mother of four from Michigan. Some time ago I decided to invest in cryptocurrency. I invested exactly $50,000 for a start with a fake broker and was made to believe that my investment had grown from my initial deposit of $50,000 to $250,700. This felt so good as the investment grew rapidly in just a few weeks. When it was time to take my profit, my withdrawal request was denied. Later on after much vain efforts,i realized that I might never get my money back.
I discovered that i had been a victim of cryptocurrency scam.
My boss at work noticed how frustrated I was so I had to open up to him about my encounter with scammers. He linked me up with Recovery Precinct, so I looked up their website and filled the contact form. They responded Swiftly and requested for details of the fraud.
To my greatest surprise, my lost funds was recovered directly to my wallet address in less than 24hours. I don’t know how they did it but it was amazing.
Recovery Precinct is a financial regulator, private investigation and fund recovery body. They warned that these types of scams involving bitcoins and other cryptocurrencies or fake merchants are becoming common lately and targeted victims come from different parts of the world.
I am sharing this to save someone out there from a lifetime disaster.
You can contact these group of Cybercrime fighters via this link:
www.recoveryprecinct.com
Thanks.
GET YOUR EX LOVER TO RESTORE YOUR BROKEN RELATIONSHIP, MARRIAGE RESTORED.
ReplyDeleteI’m just upset that I have been in pain and crying for so long and many times. Thank you dromokpo@gmail.com
I wished I would have found you earlier, you would have saved me from a lot of pain for the past five years my ex lover left me for another woman in just 2 days i contacted you Dr Omokpo you brought my broken relationship back
I spent a small fortune enough to take my dream trip to South Carolina but what’s the point in taking a dream trip without the love of my life. Dr Omokpo has given me hope and his honesty is a breath of fresh air, I feel so good and heavy happiness in my heart to get my ex lover back. Who I thought he was gone forever. We are married now as I share my testimony with you. If you have broken relationship or broken marriage or you want to get your ex lover back kindly contact: dromokpo@gmail.com
I must testify that your article is out standing.most of the articles I come across these days do not really provide anything that attracts others as yours, but believe me the way you interact is literally awesome I do respect that so much. I will instantly get your rss and stay informed of any updates you make and as well take the advantage to share some vital information about REAL ID SOUTH CAROLINA the globaltravelsdoc team.
ReplyDeleteI am happy, For sharing Useful Information on this blog its awesome blog I really impressed. Great efforts and i see the value of information. How To Develop Your Own Crypto Token
ReplyDeleteThanks for sharing this wonderful post with us. This makes finding the andar bahar online cash game more advantageous and practical. Visit rajabets.com to place a wager on the game of your choice and to enter to win a variety of bonus prizes.
ReplyDelete