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

why wrong answer on test 17 !!!!
Author: Amir Mohammad
ID: 067363
Problem: -
Contest: -
Date: 2015-11-13 08:37:18

here is my code :
// In the name of god

#include <bits/stdc++.h>

using namespace std ;

unsigned long long int a (int);

int main()

{

unsigned long long n , k , b = 1;

cin >> n >> k ;

if ( n == 0 && k == 0 )

cout << 0 ;

else {

for ( long long i = 0 ; i < k ; i++)

b *= (n - i) * (n - i) ;

cout << b / a(k) << endl ;

return 0 ;
}
}

unsigned long long int a(int n)

{

unsigned long long int s = 1 ;

for ( long long i = 1; i <= n; i++)

s *= i;

return s ;
}


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-23 06:17:50Online Contester Team © 2002 - 2016. All rights reserved.