Codeforces The New Year: Meeting Friends
2017-06-26 08:09
357 查看
import java.util.Arrays;
import java.util.Scanner;
public class TheNewYearMeetingFriends {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[] a = new int[3];
while(scanner.hasNext()) {
for(int i = 0; i < 3; i++) {
a[i] = scanner.nextInt();
}
Arrays.sort(a);
System.out.println(a[1] - a[0] + a[2] - a[1]);
}
}
}
import java.util.Scanner;
public class TheNewYearMeetingFriends {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[] a = new int[3];
while(scanner.hasNext()) {
for(int i = 0; i < 3; i++) {
a[i] = scanner.nextInt();
}
Arrays.sort(a);
System.out.println(a[1] - a[0] + a[2] - a[1]);
}
}
}
相关文章推荐
- 【Codeforces Round 375 (Div 2) A】【水题】The New Year Meeting Friends
- The New Year: Meeting Friends Codeforces Round#375-A
- codeforces——723A—— The New Year: Meeting Friends
- Codeforces 723A-The New Year: Meeting Friends
- CodeForces723-A. The New Year: Meeting Friends
- Codeforces Round #375 (Div. 2) A. The New Year: Meeting Friends 水题
- New Year Snowmen CodeForces - 140C
- Codeforces Round #456 (Div. 2) ——B. New Year's Eve(思路)
- New Year and Rating CodeForces - 750C
- Codeforces Round #403 div2 B. The Meeting Place Cannot Be Changed
- Codeforces Round #100 A. New Year Table (几何精度)
- Codeforces Round #371 (Div. 2) A. Meeting of Old Friends (水题)
- coderforce Educational Codeforces Round 6 E.New Year Tree
- Codeforces Round #456 Div.2 B. New Year's Eve
- New Year Tree CodeForces - 620E dfs序+线段树+状压
- codeforces The Meeting Place Cannot Be Changed
- Codeforces Round #403 div2 B. The Meeting Place Cannot Be Changed
- codeforces B. The Meeting Place Cannot Be Changed【二分】
- codeforces New Year Santa Network
- D - New Year Table CodeForces - 140A