1013 - O Maior
Last updated
Last updated
#include <stdio.h>
#include <stdlib.h>
int maior(int a, int b){
return (a + b + abs(a - b))/2;
}
int main(){
int a, b, c, resposta;
scanf("%d %d %d", &a, &b, &c);
resposta = maior(a, maior(b, c));
printf("%d eh o maior\n", resposta);
return 0;
}#include <iostream>
#include <cstdlib>
using namespace std;
int maior(int a, int b){
return (a + b + abs(a - b))/2;
}
int main(){
int a, b, c, resposta;
cin >> a >> b >> c;
resposta = maior(a, maior(b, c));
cout << resposta << " eh o maior" << endl;
return 0;
}let input = require("fs").readFileSync("/dev/stdin", "utf8");
let lines = input.split("\n");
const maior = (a, b) => (a + b + Math.abs(a - b)) / 2;
let [a, b, c] = lines.shift().split(" ").map((x) => parseInt(x));
let resposta = maior(a, maior(b, c));
console.log(`${resposta} eh o maior`);maior = lambda a, b: (a + b + abs(a - b))//2
a, b, c = [int(x) for x in input().split(' ')]
resposta = maior(a, maior(b, c))
print(f"{resposta} eh o maior")