OJ-Problems-Source/HDOJ/4237_autoAC.cpp

14 lines
257 B
C++
Raw Normal View History

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int t,r;
long long n,m,k;
scanf("%d",&t);
while(t--){
scanf("%d%lld%lld",&r,&k,&m);
printf("%d %lld\n",r,1+(k-m)*m);
}
return 0;
}