Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

C++ FCTRL2 Wrong Answer ?

$
0
0
#include <iostream>

using namespace std;

int main()
{
    int t;
    int n;
    int x;
    cin >> t;
    while(t)
    {
        cin >> n;
        x = 1;
        for(int i = 2; i <= n; i++)
        {
            x *= i;
        }
        cout << x << endl;
        t--;
    }

    return 0;
}


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>