結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2016-09-10 02:58:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-16 19:38:11 |
合計ジャッジ時間 | 2,298 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 34 RE * 1 |
ソースコード
def solve(): x = int(input()) if x == 0: print('1 0') elif x > 32: print('0 0') else : import math ans_pat = math.factorial(31)//math.factorial(31-x)//math.factorial(x) ans_sum = math.factorial(30)//math.factorial(30-(x-1))//math.factorial(x-1) x_32 = 2147483647 print('{0} {1}'.format(ans_pat, x_32*ans_sum)) solve()