結果

問題 No.420 mod2漸化式
ユーザー mlihua09mlihua09
提出日時 2020-09-16 16:25:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 278 bytes
コンパイル時間 1,069 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 71,404 KB
最終ジャッジ日時 2023-09-04 03:38:04
合計ジャッジ時間 5,560 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,248 KB
testcase_01 AC 80 ms
71,292 KB
testcase_02 AC 78 ms
71,400 KB
testcase_03 AC 76 ms
71,240 KB
testcase_04 AC 76 ms
71,236 KB
testcase_05 AC 78 ms
71,348 KB
testcase_06 AC 77 ms
70,988 KB
testcase_07 AC 79 ms
70,996 KB
testcase_08 AC 76 ms
71,100 KB
testcase_09 AC 76 ms
71,392 KB
testcase_10 AC 79 ms
71,240 KB
testcase_11 AC 78 ms
71,328 KB
testcase_12 AC 77 ms
71,336 KB
testcase_13 AC 76 ms
71,184 KB
testcase_14 AC 76 ms
71,272 KB
testcase_15 AC 76 ms
71,336 KB
testcase_16 AC 80 ms
71,324 KB
testcase_17 AC 77 ms
71,404 KB
testcase_18 AC 78 ms
70,984 KB
testcase_19 AC 77 ms
71,040 KB
testcase_20 AC 76 ms
71,180 KB
testcase_21 AC 78 ms
71,176 KB
testcase_22 AC 77 ms
71,196 KB
testcase_23 AC 75 ms
71,260 KB
testcase_24 AC 78 ms
71,264 KB
testcase_25 AC 76 ms
70,988 KB
testcase_26 AC 76 ms
71,180 KB
testcase_27 AC 75 ms
71,404 KB
testcase_28 AC 77 ms
71,104 KB
testcase_29 AC 78 ms
71,240 KB
testcase_30 AC 76 ms
71,332 KB
testcase_31 AC 78 ms
71,404 KB
testcase_32 AC 78 ms
71,284 KB
testcase_33 AC 77 ms
71,228 KB
testcase_34 AC 75 ms
71,292 KB
testcase_35 AC 74 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

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