結果
問題 |
No.420 mod2漸化式
|
ユーザー |
|
提出日時 | 2017-09-02 20:58:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-11-06 18:37:32 |
合計ジャッジ時間 | 3,231 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | TLE * 1 -- * 34 |
ソースコード
# -*- coding: utf-8 -*- x = int(input()) number = 0 summation = 0 def solution(n, f): global number global summation if n < 2**31: if f == x: number += 1 summation += n solution(n*2, f) elif f < x: solution(n*2, f) solution(n*2+1, f+1) else: number = 1 summation = 0 solution(1, 1) print(number, summation)