fork download
  1. import java.util.*;
  2. public class Main {
  3.  
  4. public static void main(String[] args) {
  5. Scanner s = new Scanner(System.in);
  6. System.out.println("주사위 입력 ");
  7. int a = s.nextInt();
  8. int b = s.nextInt();
  9. int c = s.nextInt();
  10. long total=0L;
  11. s.close();
  12.  
  13. if(a==b && b==c) {
  14. total = 10000+a*1000;
  15. }
  16. else if ((a==b && a!=c)|| (a!=b && b==c)) {
  17. total = 1000+b*100;
  18. }
  19. else if ( a!=b && b!=c && a!=c) {
  20. if(a>b && a>c) {
  21. total= a*100;
  22. }
  23. else if (a<b && b>c ) {
  24. total =b*100;
  25. }
  26. else if (a<c && b <c) {
  27. total =c*100;
  28. }
  29. }
  30. System.out.println("상금 : "+total);
  31. }
  32. }
Success #stdin #stdout 0.15s 38436KB
stdin
3 6 3
stdout
주사위 입력  
상금 : 0