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

Sifat Rabbi

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 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | FariD | Cpp14 | 0.00s |

02 | Morass | Cpp14 | 0.01s |

03 | Monir_AUST | Cpp14 | 0.01s |

04 | Koushik54 | Cpp14 | 0.03s |

05 | ammasum | Cpp14 | 0.03s |

06 | jualahmed | Cpp14 | 0.03s |

07 | afzalul | Cpp14 | 0.03s |

08 | soumitro_cse1604114 | Cpp14 | 0.03s |

09 | abdulmukit | Cpp | 0.03s |

10 | hmtanbir | Cpp14 | 0.03s |

11 | giash_uddin | Cpp14 | 0.04s |

12 | non_coder | Cpp14 | 0.04s |

13 | Mehedi07 | Cpp14 | 0.04s |

14 | JubayerSohel | Cpp14 | 0.04s |

15 | sadia2427 | Cpp14 | 0.04s |

16 | Nazmul_WUB | Cpp14 | 0.04s |

17 | ozone | Cpp14 | 0.04s |

18 | onucsecu | Cpp14 | 0.04s |

19 | emrul | Cpp14 | 0.04s |

20 | tariqiitju | Cpp14 | 0.04s |

21 | Fuse_box | C | 0.04s |

22 | t0whid | Cpp | 0.04s |

23 | mukit55 | Cpp | 0.04s |

24 | imtyaz17 | Cpp | 0.04s |

25 | Riaz_BSMRSTU | C | 0.04s |

26 | Not_Found0001 | Cpp | 0.04s |

27 | Mushfiq1604123 | Cpp | 0.04s |

28 | kpretomazi | Cpp | 0.04s |

29 | SakibAlamin | Cpp14 | 0.04s |

30 | Shammo | Cpp14 | 0.04s |

31 | tasnuva1604087 | C | 0.04s |

32 | maruf089 | C | 0.04s |

33 | feodorv | C | 0.04s |

34 | Alnoman120113 | Cpp14 | 0.04s |

35 | MohammadShamim | Cpp | 0.04s |

36 | _dipu | Cpp | 0.04s |

37 | prateepm | Cpp14 | 0.04s |

38 | Nasif_44th | C | 0.04s |

39 | nafischonchol | C | 0.04s |

40 | Antor_Sarker_Sabuj | C | 0.04s |

41 | Imran26 | C | 0.04s |

42 | Tusar | C | 0.04s |

43 | Baby_programmer | C | 0.04s |

44 | rabbicse | Cpp | 0.04s |

45 | rockersabbir | Cpp | 0.04s |

46 | saeefad | Cpp | 0.04s |

47 | Ashiq | C | 0.04s |

48 | ErrorICE | Cpp | 0.04s |

49 | hasanuzzaman333 | C | 0.04s |

50 | ash12 | Cpp14 | 0.05s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(