阅读背景:

Codeforces Round #653 (Div. 3) A~E1

来源:互联网 

减去y,相除, 直接求
--

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define rep(i,j,k) for(LL i=(j); i<(k); ++i)
#define pb push_back
#define PII pair<LL,LL>
#define PLL pair<long long, long long>
#define ini(a,j) memset(a,j,sizeof a)
#define rrep(i,j,k) for(LL i=j; i>=k; --i)
#define fi first
#define se second
#define LL long long
#define beg begin()
#define ed end()
#define all(x) x.begin(),x.end()


int main(int argc, char const *argv[])
{
	// #define DEBUG
    	#ifdef DEBUG
		freopen("1.dat","r",stdin);
		freopen("ans.dat","w",stdout);
	#endif
	LL _;
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin>>_;
	while(_--){
		LL a,b,c;
		cin>>a>>b>>c;
		c-=b;
		LL d = c/a;
		cout<<(d)*a+b<<endl;
	}
	return 0;
}
#include<bits/stdc++.



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: