結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2017-08-03 22:54:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 366 bytes |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 54,356 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 20:35:12 |
| 合計ジャッジ時間 | 1,773 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 4 WA * 31 |
ソースコード
#include <iostream>
using namespace std;
int main(){
long long int x;
long long int ans=1,sum=1;
cin >> x;
if(x>31)ans=0;
else{
for(long long int i=1;i<=x;i++)ans=ans*(31-i+1)/i;
}
if(x==0 || x>31)sum=0;
else{
for(long long int i=i=1;i<=x-1;i++)sum=sum*(30-i+1)/i;
sum*=2147483646;
}
cout << ans << " " << sum << endl;
return 0;
}
notetonous