結果
問題 | No.420 mod2漸化式 |
ユーザー |
|
提出日時 | 2017-09-21 00:28:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 227 bytes |
コンパイル時間 | 739 ms |
コンパイル使用メモリ | 63,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 09:23:26 |
合計ジャッジ時間 | 1,835 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;}