Codeforces_723_A

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);
 } 
时间: 2024-10-13 19:27:27

Codeforces_723_A的相关文章