← Back to List

2869번: 달팽이는 올라가고 싶다 ↗

Solutions

C++14
143 B | 143 chars
#include <iostream>
using namespace std;
int A,B,V,C,S;
int main()
{
	cin>>A>>B>>V;
	C=A-B;
	
	V-=A;
	S+=V/C;
	if(V%C>0) S++;
	S++;
	cout<<S;
}