시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB1477100.000%

문제

A bi-infinite sequence means a sequence that is infinite in both directions. In other words, it means a function whose domain is the set of all integers. The writer of this problem defined their bi-infinite sequence $(K_n)_{n\in\mathbb Z}$ and called it "KSA bi-infinite sequence" with a parameter $t$ where $t$ is a positive integer. It satisfies the following for all integers $n$.

  • $K_n=5701.5+0.5\cdot(-1)^n$ if $0\le n<t$
  • $K_n=\sum_{j=1}^t(t+1-j)K_{n-j}$

Write a function biinfinite:

  • input parameter: two int-type objects whose values are $t$ and $n$, respectively, where $1\le t\le 8$ and $|n|\le10^{12}$
  • return value: the int-type object whose value is $\lfloor K_n\rfloor-M\left\lfloor\frac{K_n}M\right\rfloor$ where $M=202112210950$ and $K_n$ is the $n$-th term of KSA bi-infinite sequence with a parameter $t$

출처

School > 한국과학영재학교 > 2021 Fall PPS Final Mock Exam 6번

  • 문제를 만든 사람: parkky
  • 문제를 검수한 사람: jh05013

제출할 수 있는 언어

PyPy3

채점 및 기타 정보

  • 예제는 채점하지 않는다.