結果

問題 No.129 お年玉(2)
ユーザー tabataba
提出日時 2017-05-20 09:30:06
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 530 bytes
コンパイル時間 1,247 ms
コンパイル使用メモリ 130,296 KB
最終ジャッジ日時 2025-01-05 00:29:33
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>
#include <set>
#include <iostream>
#include <numeric>

using namespace std;

int64_t c(int64_t m,int64_t n){
	int64_t s=1;
	for(int64_t i=0;i<n;i++){
		s*=m-i;
		s/=i+1;
	}
	return s;
}

int main(){
	int64_t n,m;
	-scanf("%ld%ld",&n,&m);
	n%=m*1000;
	n/=1000;
	cout<<c(m,n)<<endl;
	return 0;
}
0