# DCP-219: Write an algorithm Back to All Problems

Topu is a student of Computer Science & Engineering. And recently he taken a course of 3 credits named Algorithm Design & Analysis. He is so much interested for writing new algorithms with new techniques. Recently he invented some new techniques for writing pseudo-code. His techniques is designed for four types of operation. First one is: '**+**' Second one is: '**-**' Third one is: '*****' Fourth one is: '**/**' The pseudo-code for these operation is given below with examples: 4+3 -> "**add 4 to 3**" 4-3 -> "**subtract 3 from 4**" 4*3 -> "**multiply 4 with 3**" 4/3 -> "**divide 4 by 3**" **Note:** If any steps repeat then the output will be "**repeat step x**". where x is the step number when **the instruction was written** Don't count the repeated instructions as a new step. Be careful about some instructions like **4+3 & 3+4 is a same type of instruction** because they both creates same result 7. Although 5+2 is not considered same which also creates the same result 7. Also, **4*3 and 3*4 are considered same instruction**. Input: ------ There will be multiple cases upto EOF. Input starts with an integer **N (1<=N<=20)**, denoting the number of instructions set. Each case contains two integers **x** & **y** with any of the four operation which mentioned above. **(0<=x,y<=9)** Output: ------- For each case of input there should be one line of output with a case number like ("**Instruction x:** " where x denotes the instruction number) and the pseudo-code of the operation followed by a new line. For more clarification please see the simple input and output. Sample Input ------------ 5 4+3 4*3 4/3 4-3 4/3 1 4+3 Sample Output ------------- Instruction 1: add 4 to 3 Instruction 2: multiply 4 with 3 Instruction 3: divide 4 by 3 Instruction 4: subtract 3 from 4 Instruction 5: repeat step 3 Instruction 1: add 4 to 3

### Problem Limits

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

# 105/815

Solve/Submission

### Ranking

# User Language Timing
02 emotionless Cpp14 0.00s
03 MRoy Cpp14 0.00s
04 sayedgkm Cpp14 0.00s
05 I_See_You Cpp14 0.00s
06 habib_rahman Cpp14 0.00s
07 trifiasco Cpp14 0.00s
08 mamun4122 Cpp14 0.00s
09 Knight_King Cpp14 0.00s
10 sahedsohel Cpp14 0.00s
11 seyedssz Cpp14 0.00s
12 SleepyBrain Cpp14 0.00s
13 ThunderStroke Cpp14 0.00s
14 nasif2587 Cpp14 0.00s
15 tuxcoder Cpp14 0.00s
16 PKP_007 Cpp14 0.00s
17 pulak_ict_mbstu Cpp14 0.00s
18 mahbubcseju Cpp14 0.00s
19 pentagon9 Cpp14 0.00s
20 nasir_32_15 Cpp14 0.00s
21 dip_BRUR Cpp14 0.00s
22 Santho07 Cpp14 0.00s
23 moshiur_cse15 Cpp14 0.00s
24 anindita Cpp14 0.00s
25 Maruf_75 Cpp14 0.00s
26 rajdipsaha Cpp14 0.00s
27 kissu_pari_na Cpp14 0.00s
28 snow_man Cpp14 0.00s
29 dmehrab06 Cpp14 0.00s
30 saurabh3240 Cpp14 0.00s
31 mukhter2 Cpp14 0.00s
32 aseem_cu Cpp14 0.00s
33 rezwanul502 Cpp14 0.00s
34 Gang_Of_Three_01 Cpp14 0.00s
35 emrul Cpp14 0.00s
36 subhashis_cse Cpp14 0.00s
37 forkkr Cpp14 0.00s
38 rayhan50001 Cpp14 0.00s
39 ashraful_haque Cpp14 0.00s
41 abid1 Cpp14 0.00s
42 Code_Hunter Cpp14 0.00s
43 sakib_ruet_13 Cpp14 0.00s
44 _zErO_ Cpp14 0.00s