結果

問題 No.129 お年玉(2)
ユーザー kotatsugame
提出日時 2017-07-15 07:08:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 192 bytes
コンパイル時間 696 ms
コンパイル使用メモリ 65,300 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-08 01:32:41
合計ジャッジ時間 2,461 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
long n,m;
main()
{
	cin>>n>>m;n-=n/(m*1000)*m*1000;n/=1000;
	long ans=1;
	for(long i=1;i<=n;i++)
	{
		ans=ans*(m-i+1)/i;
	}
	cout<<ans%int(1e9)<<endl;
}
0