結果

問題 No.420 mod2漸化式
ユーザー mlihua09
提出日時 2020-09-16 16:25:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 278 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 82,472 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2024-06-22 03:19:55
合計ジャッジ時間 2,866 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #


x = int(input())

if x > 31:
    
    print(0, 0)
    
else:
    ans = 1
    
    for i in range(x):
        ans *= 31 - i
        
    for i in range(1, x + 1):
        ans //= i
        
    print(ans, end=' ')
    
    ans *= x
    ans //= 31
    print(ans * (2 ** 31 - 1))
0