結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-20 23:39:28 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 1,020 ms |
| コンパイル使用メモリ | 117,376 KB |
| 実行使用メモリ | 16,200 KB |
| 最終ジャッジ日時 | 2026-03-05 08:03:10 |
| 合計ジャッジ時間 | 25,905 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 22 WA * 2 TLE * 11 |
ソースコード
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);
}