Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Round 1 Confusion codechef solution in c++

#include<iostream>
using namespace std;

int main()
{
	int n, k, x, sum;
	int t;
	cin >> t;
	for (int i = 0; i < t; i++)
	{
		cin >> n >> k >> x;
		sum = 0;
		sum += (n / k) - (x / k);
		cout << sum << "
";
	}
	cout << "
";
	return 0;
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #Round #Confusion #codechef #solution
ADD COMMENT
Topic
Name
3+6 =