https://codeforces.com/contest/1379/problem/B
如果m>i,则有两种情况,m%i在范围内或者i-m%i在范围内,m<i,只有i-m%i的情况。
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int l,r;
long long m;
cin>>l>>r>>m;
for(int i=l;i<=r;i++)
{
if(m>=i&&m%i<=r-l)
{
cout<<i<<" "<<r<<" "<<r-m%i<<endl;
break;
}
if(i-m%i<=r-l)
{
cout<<i<<" "<<r-i+m%i<<" "<<r<<endl;
break;
}
}
}
return 0;
}