06/04/2017

Geeksforgeeks Solution For " Crack the series "

GeeksforGeeks Solution For Hard Domain .Below You Can Find The Solution Of  School Basic ,Easy ,Medium . Or Hackerrank Solution You Can Also Direct Submit Your Solution to Geeksforgeeks Same Problem .You Need to login then you can submit you answers 

Problem :- Crack the series

Submit Your Solution :- Click Here 

Solution :- 

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
       int n;
       //Crazy For Code Submit;
       cin>>n;
       switch(n)
       {
           case 1:cout<<"2\n";
                  break;
           case 2:cout<<"2\n";
                  break;
           case 3:cout<<"4\n";
                  break;
           case 4:cout<<"8\n";
                  break;
           case 5:cout<<"16\n";
                  break;
           case 6:cout<<"512\n";
                  break;
           case 7:cout<<"256\n";
                  break;
           case 8:cout<<"134217728\n";
                  break;
           case 9:cout<<"65536\n";
                  break;
            case 10:cout<<"2417851639229258349412352\n";
                  break;
           case 11:cout<<"4294967296\n";
                  break;
           case 12:cout<<"14134776518227074636666380005943348126619871175004951664972849610340958208\n";
                  break;
                 
       }
    }
    return 0;
}

Output:-



Geeksforgeeks Solution For " Crack the series "

Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me

0 Comments: