DCP-106: Tazz's Cricket Back to All Problems

Easy Beginners Problems > Ad-hoc


Today Tazz and some of his friend are playing cricket. They are really having fun. But when Tazz bats he doesn't like to get out soon. By hook or by crook he will bat as long as he want. If he is premeditated that he will left bating after getting out N times his friend have to get him out N times. Now there is no scoreboard for counting runs. You have to create a program for that group of people for only counting Tazz's runs. Input: ------ The first line of the input is consist of number of Test Case T . Then the first line of each test case will be consist of an integer N (1 ≤ N ≤ 1000) . Then in the next line there will be several integer a1 ,  a2,  ...,  an (1≤ ai ≤ 6) until Tazz get out N times. Tazz can score 1 , 2 , 3 , 4 or 6 runs in each ball or he can get out. The number '0' (ZERO) will represent that he is out. Output: ------- For each test case, print on a single line the case number (starting with 1) followed by the number of runs Tazz will score. Sample Input ------------ 2 2 1 2 0 3 5 0 3 1 6 0 1 1 0 4 6 0 Sample Output ------------- Case 1: 11 Case 2: 19


Problem Setter:

Sifat Rabbi

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 1.00
C++ 1.00
C++14 1.00
C# 1.00
Go 1.00
Java 1.00
JavaScript 1.00
Objective-C 1.00
Perl 1.00
PHP 1.00
Python 1.00
Python3 1.00
Ruby 1.00
VB.Net 1.00

Problem Stats

236/496

Solve/Submission

Ranking

# User Language Timing
01 FariD Cpp14 0.00s
02 Morass Cpp14 0.01s
03 Monir_AUST Cpp14 0.01s
04 abdulmukit Cpp 0.03s
05 jualahmed Cpp14 0.03s
06 afzalul Cpp14 0.03s
07 soumitro_cse1604114 Cpp14 0.03s
08 ammasum Cpp14 0.03s
09 hmtanbir Cpp14 0.03s
10 Koushik54 Cpp14 0.03s
11 maruf089 C 0.04s
12 Mehedi07 Cpp14 0.04s
13 giash_uddin Cpp14 0.04s
14 non_coder Cpp14 0.04s
15 onucsecu Cpp14 0.04s
16 emrul Cpp14 0.04s
17 JubayerSohel Cpp14 0.04s
18 sadia2427 Cpp14 0.04s
19 Nazmul_WUB Cpp14 0.04s
20 ozone Cpp14 0.04s
21 tariqiitju Cpp14 0.04s
22 SakibAlamin Cpp14 0.04s
23 Shammo Cpp14 0.04s
24 feodorv C 0.04s
25 Alnoman120113 Cpp14 0.04s
26 MohammadShamim Cpp 0.04s
27 Not_Found0001 Cpp 0.04s
28 _dipu Cpp 0.04s
29 kpretomazi Cpp 0.04s
30 Nasif_44th C 0.04s
31 Mushfiq1604123 Cpp 0.04s
32 Antor_Sarker_Sabuj C 0.04s
33 31_ipn Cpp 0.04s
34 Tusar C 0.04s
35 Baby_programmer C 0.04s
36 rabbicse Cpp 0.04s
37 Fuse_box C 0.04s
38 Imran26 C 0.04s
39 Riaz_BSMRSTU C 0.04s
40 tasnuva1604087 C 0.04s
41 mukit55 Cpp 0.04s
42 imtyaz17 Cpp 0.04s
43 prateepm Cpp14 0.04s
44 nafischonchol C 0.04s
45 t0whid Cpp 0.04s
46 rockersabbir Cpp 0.04s
47 saeefad Cpp 0.04s
48 ash12 Cpp14 0.05s
49 terminator_c Cpp14 0.05s
50 smriad Cpp14 0.08s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support