307588: CF1379B. Dubious Cyrpto
Memory Limit:512 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Dubious Cyrpto
题意翻译
本题有 $T$ $(1 \leq T\leq 20)$组测试数据 对于每一组测试数据,给出三个正整数$l,r,m$ 其中 $( 1 \leq l \leq r \leq 500\,000 , 1 \leq m \leq 10^{10} )$ 求出满足$n \times a+ b-c=m$的任意一组$a,b,c$的值 其中$l \leq a,b,c \leq r$ 保证数据有解题目描述
Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer $ n $ , he encrypts it in the following way: he picks three integers $ a $ , $ b $ and $ c $ such that $ l \leq a,b,c \leq r $ , and then he computes the encrypted value $ m = n \cdot a + b - c $ . Unfortunately, an adversary intercepted the values $ l $ , $ r $ and $ m $ . Is it possible to recover the original values of $ a $ , $ b $ and $ c $ from this information? More formally, you are asked to find any values of $ a $ , $ b $ and $ c $ such that - $ a $ , $ b $ and $ c $ are integers, - $ l \leq a, b, c \leq r $ , - there exists a strictly positive integer $ n $ , such that $ n \cdot a + b - c = m $ .输入输出格式
输入格式
The first line contains the only integer $ t $ ( $ 1 \leq t \leq 20 $ ) — the number of test cases. The following $ t $ lines describe one test case each. Each test case consists of three integers $ l $ , $ r $ and $ m $ ( $ 1 \leq l \leq r \leq 500\,000 $ , $ 1 \leq m \leq 10^{10} $ ). The numbers are such that the answer to the problem exists.
输出格式
For each test case output three integers $ a $ , $ b $ and $ c $ such that, $ l \leq a, b, c \leq r $ and there exists a strictly positive integer $ n $ such that $ n \cdot a + b - c = m $ . It is guaranteed that there is at least one possible solution, and you can output any possible combination if there are multiple solutions.
输入输出样例
输入样例 #1
2
4 6 13
2 3 1
输出样例 #1
4 6 5
2 2 3