[白俊]2480号:サイコロ3個
できるだけ自分で解決するのでコードが悪い...
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int money = 0;
int max = 0;
if(A == B) {
if(B == C) {
System.out.println(10000 + (A * 1000));
}
else
System.out.println(1000 + (A * 100));
}
else if(B == C) {
if(C != A) {
System.out.println(1000 + (C * 100));
}
}
else if(C == A) {
if(A != B) {
System.out.println(1000 + (C * 100));
}
}
else if(A != B) {
if(B != C) {
max = A > B ? A : B;
max = max > C ? max : C;
System.out.println(max*100);
}
}
}
}
Reference
この問題について([白俊]2480号:サイコロ3個), 我々は、より多くの情報をここで見つけました https://velog.io/@kameron5899/백준-2480번-주사위-세개テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol