No.895 MESE
タグ : / 解いたユーザー数 136
作問者 :
fuppy_kyopro
/ テスター :
e869120
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
Problem Statement
You are given three positive integers $a, b, c$. Find the sum of $z$ over all triples of positive integers $(x, y, z)$ satisfying the conditions below.
Since the answer can be very large, output it modulo $10^9+7$.
- When $x, y, z$ are written in binary, the numbers of digits equal to 1 are $a, b, c$, respectively.
- $x > y > z$ holds.
- $(x~or~y~or~z) = 2^{a + b + c} - 1$ holds.
Input
$a\ b\ c$
- $1 ≤ a, b, c ≤ 10^5$
- $a, b, c$ are all integers.
Output
Output on one line the sum of $z$ over all triples $(x, y, z)$ satisfying the conditions, modulo $10^9+7$.
Print a newline at the end.
Sample
Sample 1
Input
2 2 1
Output
17
The triples $(x, y, z)$ satisfying the conditions are, in binary,
(11000, 00110, 00001), (11000, 00101, 00010), (10100, 01010, 00001), (10100, 01001, 00010),
(10010, 01100, 00001), (10010, 01001, 00100), (10001, 01100, 00010), (10001, 01010, 00100)
for a total of $8$ triples.
The required sum of $z$ is $1+2+1+2+1+4+2+4=17$.
Sample 2
Input
1 1 1
Output
1
The only triple $(x, y, z)$ satisfying the conditions is $(4, 2, 1)$.
Sample 3
Input
100 100 100
Output
208072283
Be careful to output the value modulo $10^9+7$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。