码迷,mamicode.com
首页 > 其他好文 > 详细

Codeforces_723_A

时间:2016-10-04 01:35:18      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

http://codeforces.com/problemset/problem/723/A

 

取中间那个数就可以了,答案为最大值减最小值。

 

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
using namespace std;

int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    int x = min(a,b);
    x = min(x,c);
    int z = max(a,b);
    z = max(z,c);
    printf("%d\n",z-x);
 } 

 

Codeforces_723_A

标签:

原文地址:http://www.cnblogs.com/zhurb/p/5929920.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!