Saratov State University :: Online Contester


::Go
- home
- news
- register
- update personal info
- problemset archive
- submit
- status online
- standing
- contests
- virtual contests
- forum
- statistic
- FAQ
- links
- projects

::Poll
Are you registered on Codeforces?
Yes
No
What is it???

[results]

::webboard

presentation error??? why???
Author: I. Tech.
ID: 041052
Problem: 222
Contest: 0
Date: 2013-02-21 21:36:59

i get presentation error on test 65, problem 222...
can anybody help plz...

here's my code:

#include <iostream>

using namespace std;

unsigned long long int factorial(int);

int main()
{
int n, k, product = 1;

cin >> n >> k;

for (int i = 0; i < k; i++)
product *= (n - i) * (n - i);
cout << product / factorial(k) << endl;

return 0;
}

unsigned long long int factorial(int n)
{
unsigned long long int result = 1;
for (int i = 1; i <= n; i++)
result *= i;
return result;
}


see sub-tree reply to that message


::Login
Forgot password?

::News
22.10.12 - The problems from the Southern Subregional Programming Contest 2012 added to the problemset archive (542 - 553).
22.10.12 - After the start of the contest the statements in PDF will be available by the link.
23.10.11 - The problems from the Southern Subregional Programming Contest 2011 added to the problemset archive (530 - 541).

::Counter

Server time: 2017-11-24 14:07:22Online Contester Team © 2002 - 2016. All rights reserved.