Logo
(追記) (追記ここまで)

31111번 - Algebra 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 1024 MB115360.000%

문제

Given three integers $n,ドル $m,ドル $k,ドル find the number of pairs $(a, b)$ where

  • $|a|, |b| \leq m,ドル
  • $a, b \in \mathbb{Z},ドル i.e., $a$ and $b$ are integers,
  • $|S| = k$ where $S$ be the set of rational roots of the equation $x^n + a \cdot x + b = 0,ドル and $|S|$ is the size of $S$. In particular, there exists exactly $k$ distinct rational numbers $x$ which solve the last equation.

Note: $x$ is a rational number if and only if there exists two integers $p$ and $q$ ($q \neq 0$) where $x = \frac{p}{q}$.

입력

The input consists of several test cases terminated by end-of-file. For each test case,

The first line contains three integers $n,ドル $m$ and $k$.

출력

For each test case, output an integer which denotes the number of pairs.

제한

  • 1ドル \leq n, m, k \leq 5 \times 10^5$
  • In each input, the sum of $m$ does not exceed 5ドル \times 10^5$.

예제 입력 1

2 1 1
2 2 2
3 3 3

예제 출력 1

1
7
1

노트

For the first test case, only the equation $x^2=0$ has one rational root.

For the second test case, each of the following 7ドル$ equations has two distinct rational roots.

  • $x^2-2x=0$
  • $x^2-x=0$
  • $x^2-x-2=0$
  • $x^2-1=0$
  • $x^2+x=0$
  • $x^2+2x=0$
  • $x^2+x-2=0$

출처

Contest > Open Cup > 2020/2021 Season > Stage 18: Grand Prix of Beijing B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /