結果
問題 |
No.129 お年玉(2)
|
ユーザー |
![]() |
提出日時 | 2017-08-11 00:12:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 1,520 ms |
コンパイル使用メモリ | 165,448 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 19:00:15 |
合計ジャッジ時間 | 3,007 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 42 |
コンパイルメッセージ
main.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 11 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; ll combi(ll n, ll r){ ll i,p=1; for(i=1;i<=r;i++)p=p*(n-i+1)/i % INF; return p; } main(){ ll N,M; cin >> N >> M; cout << combi(M,N/1000%M) << endl; }