Sie sind auf Seite 1von 2

7/30/2016 TCS:CodeVitaCodingArena

TCSNextStepTCSCareerswww.tcs.com Logout

WelcomeSHRADDHANARKE Home CodingArena MyCompile&Run MySubmissions Graphs Feedback

TimeLeft

CodingArena 05 40 30
hr min sec

A B C D E F G H

Rules&Regulations
Problem:ExamEfficiency
LaunchCodeEditor
Inanexaminationwithmultiplechoicequestions,thefollowingistheexamquestionpattern.

X1numberofOnemarkquestions,havingnegativescoreof1foransweringwrong
X2numberofTwomarkquestions,havingnegativescoreof1and2foroneorbothoptionswrong
X3numberofThreemarkquestions,havingnegativescoreof1,2and3forone,twoorallthreeoptions
wrong
ScoreRequiredtoPasstheexam:Y
For1,2and3markquestions,1,2and3optionsmustbeselected.Simplyput,oncehastoattempttoanswer
allquestionsagainstalloptions.

Identifytheminimumaccuracyraterequiredforeachtypeofquestiontocracktheexam.

Calculationsmustbedoneupto11precisionandprintingupto2digitprecisionwithceilvalue

InputFormat:

FirstlinecontainsnumberofonemarkquestionsdenotedbyX1,
SecondlinecontainsnumberoftwomarkquestionsdenotedbyX2
ThirdlinecontainsnumberofthreemarkquestionsdenotedbyX3
FourthlinecontainsnumberofmarksrequiredtopasstheexamdenotedbyY.

OutputFormat:

MinimumAccuracyraterequiredforonemarkquestionis80%
MinimumAccuracyraterequiredforTwomarkquestionis83.33%
MinimumAccuracyraterequiredforThreemarkquestionis90%

Note:Ifthemarkrequiredtopasstheexamcanbeachievedbyattemptingwithoutattemptinganyparticulartypeof
questionthenshowmessagesimilarto,Onemarkquestionneednotbeattempted,sonominimumaccuracyrate
applicable

SeeExampleTestcasesforbetterunderstanding.

SampleInputandOutput

SNo. Input Output Explaination

Ifonegotfullmarksintwo
marksquestionandthree
Onemarkquestionsneednotbeattempted,sono
marksquestionthentotal
20 minimumaccuracyrateapplicable.
accuracycanbe0inonemark
1 30 MinimumAccuracyraterequiredforTwomarkquestionis
question
30 58.33%
120 MinimumAccuracyraterequiredforThreemarkquestionis
Insamewayitwillbedonefor
72.23%
twomarksandthreemarks
question

Ifonegotfullmarksintwo
marksquestionandthree
MinimumAccuracyraterequiredforonemarkquestionis marksquestionthentotal
20 100% accuracyshouldbe100%in
2 30 MinimumAccuracyraterequiredforTwomarkquestionis onemarkquestiontopassthe
30 100% exam.
170 MinimumAccuracyraterequiredforThreemarkquestionis
100% Insamewayitwillbedonefor
twomarksandthreemarks
question

Note:

Pleasedonotusepackageandnamespaceinyourcode.Forobjectorientedlanguagesyourcodeshouldbewritteninone
class.

https://www.tcscodevita.com/CodevitaV5/problemstart.jsp 1/2
7/30/2016 TCS:CodeVitaCodingArena
Note:

ParticipantssubmittingsolutionsinClanguageshouldnotusefunctionsfrom<conio.h>/<process.h>asthesefilesdonot
existingcc
Note:

ForCandC++,returntypeofmain()functionshouldbeint.

2016TataConsultancyServicesLimited.AllRightsReserved.

SubmitAnswer

I,SHRADDHANARKEconfirmthattheanswersubmittedismyown.

Browse...

2016TataConsultancyServicesLimited.AllRightsReserved. InAssociationwith |PrivacyPolicy


https://www.tcscodevita.com/CodevitaV5/problemstart.jsp 2/2