NLP - Networking lover Poltu!
Poltu has recently passed BSc in Computer Science & Engineering from a university. In his varsity life he liked ‘Networking’. For this reason he avoided all types of programming related activities. Unfortunately he was known by someone that ‘networking is the best part of CSE and programming is not necessary for this topic’. For this misconception he stopped learning basic programming, data structure, algorithm etc. He liked to connect two or more computers and playing game with these. In his university he was a live legend of ‘networking’ site (!).
After passing BSc, Poltu has joined a private company as a network engineer with reference of his ‘Mama-Khalu’. He is now very happy.
This is the first day of Poltu’s professional life. He has to complete a easy counting job within very short time. In his company there are some computers. Each computer is connected with others using a crazy network topology. There is a main PC. All PCs are somehow connected with this main PC. Hub-1 is a hub that connects between PC-1 and main PC. Under Hub-1 there is only one PC. Hub-2 makes connection between ‘PC-2, PC-3’ and main PC. That means under Hub-2 there are 2 PCs (PC-2 and PC-3). Under Hub-3 there are 3 PCs (PC-4, PC-5, PC-6 and these PCs are connected with main PC by Hub-3). And all others PC are connected with main PC by their hub in same way.
Poltu is assigned to count “How many PCs are connected with main PC?” He is starting count the PCs manually. Can you find the answer without applying any networking knowledge or manual process?
Input
There are some test cases. Each line contains only one integer H. H is the number of hubs in that network. Don’t fear about the size of H. It will be fit in 32 bit signed integer range. You have to get input from an input file using a standard method. You must continue your ‘input-processing-output’ task until the file ends.
Output
Print Case number and the numbers of PCs are connected with main PC as described above. Output format is “Case t: N” (without quote), where t is case number and N is number of PC connected with main PC.
Input: 1 3 Output: Case 1: 1 Case 2: 6
Problem setter: Hasan Abdullah
Added by: | Najmuzzaman |
Date: | 2015-04-08 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 JS-MONKEY |