#include<iostream>
using namespace std;
int main(){
	int n,x,y,a,b,c;
	cin>>n>>x>>y;
	a=n/x;
	b=n%x;
	c=a*y+b;
	if(x<y){
		cout<<c;
	}else if(x>y){
		cout<<n;
	}else if(x=y){
		cout<<n;
	}
	return 0;
}

1 comments

  • 1

Information

ID
2130
Time
1000ms
Memory
256MiB
Difficulty
4
Tags
(None)
# Submissions
43
Accepted
22
Uploaded By