結果
| 問題 |
No.420 mod2漸化式
|
| ユーザー |
|
| 提出日時 | 2016-10-20 23:39:28 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 1,830 ms |
| コンパイル使用メモリ | 143,296 KB |
| 実行使用メモリ | 13,884 KB |
| 最終ジャッジ日時 | 2024-06-12 04:41:30 |
| 合計ジャッジ時間 | 4,294 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 34 |
ソースコード
import std.stdio;
import std.math;
void main() {
uint x; readf("%s", &x);
writef("%d %d\n", c(31, x), (1 <= x) ? ((pow(2, 31) - 1) * c(30, x-1)) : 0);
}
ulong c(uint n, uint k) {
if (0 == k % n) { return 1; }
return c(n-1, k) + c(n-1, k-1);
}