結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-21 00:28:07 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 227 bytes |
| 記録 | |
| コンパイル時間 | 558 ms |
| コンパイル使用メモリ | 73,856 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-08 15:22:11 |
| 合計ジャッジ時間 | 2,313 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
コンパイルメッセージ
main.cpp:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
long c(int a,int b){
if(b<0||a<b)return 0;
long ans=1;
for(long i=1;i<=b;i++)ans=ans*(a-b+i)/i;
return ans;
}
main()
{
long x;cin>>x;cout<<c(31,x)<<" "<<c(30,x-1)*~-(1L<<31)<<endl;
}