Deer is Better! ural 1740

Deer is Better!
Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u

Description

A crow is sitting on a branch with a piece of cheese in its mouth.
A fox is running by:
“Crow, are you going to the election?”
“No!”
The cheese falls down. The crow sits thinking:
“Would anything have changed had I said yes?”
A Chukcha set out to go to the election. There are  l kilometers between his yaranga and the polling station. His deer run so that they cover every  k-kilometer segment of the way in exactly  h hours. What is the minimal and maximal time in which the Chukcha will be able to perform his civic duty?

Input

The only input line contains space-separated integers  lk, and  h (1 ≤  k ≤  l ≤ 1000; 1 ≤  h ≤ 1000).

Output

Output the minimal and maximal time in which Chukcha can get from his yaranga to the polling station, accurate to at least 10 –5. The numbers must be separated with a space.

Sample Input

input output
30 10 1
3.00000000 3.00000000					
#include <iostream>
#include <cstdio>

using namespace std;

void input()
{
	int l, k, h;
	
	cin >> l >> k >> h;
	
	int ans = l % k ? l / k + 1 : l / k;
	
	printf("%.8lf %.8lf\n", (double)(l / k * h), (double)ans * h);
}

int main()
{
	std::ios::sync_with_stdio(false);
	input();
	return 0;
}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值