結果

問題 No.2414 2 KA 3 KA
ユーザー hiromi_ayasehiromi_ayase
提出日時 2023-08-12 14:18:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 1,989 bytes
コンパイル時間 2,503 ms
コンパイル使用メモリ 77,944 KB
実行使用メモリ 37,692 KB
最終ジャッジ日時 2024-05-02 13:22:19
合計ジャッジ時間 5,189 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
37,320 KB
testcase_01 AC 49 ms
37,488 KB
testcase_02 AC 51 ms
37,172 KB
testcase_03 AC 48 ms
37,692 KB
testcase_04 AC 46 ms
37,296 KB
testcase_05 AC 45 ms
37,172 KB
testcase_06 AC 47 ms
37,484 KB
testcase_07 AC 49 ms
37,648 KB
testcase_08 AC 48 ms
37,512 KB
testcase_09 AC 49 ms
37,476 KB
testcase_10 AC 49 ms
37,596 KB
testcase_11 AC 46 ms
37,532 KB
testcase_12 AC 46 ms
37,036 KB
testcase_13 AC 48 ms
37,188 KB
testcase_14 AC 48 ms
37,548 KB
testcase_15 AC 47 ms
37,120 KB
testcase_16 AC 48 ms
37,500 KB
testcase_17 AC 47 ms
37,436 KB
testcase_18 AC 46 ms
37,196 KB
testcase_19 AC 50 ms
37,668 KB
testcase_20 AC 51 ms
37,076 KB
testcase_21 AC 50 ms
37,164 KB
testcase_22 AC 46 ms
37,404 KB
testcase_23 AC 47 ms
37,184 KB
testcase_24 AC 47 ms
37,392 KB
testcase_25 AC 46 ms
37,180 KB
testcase_26 AC 47 ms
37,348 KB
testcase_27 AC 49 ms
37,404 KB
testcase_28 AC 48 ms
37,508 KB
testcase_29 AC 48 ms
37,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

@SuppressWarnings("unused")
public class Main {

  private static void solve() {
    int a = ni();
    int b = ni();
    int c = ni();

    int y = a * b * c;
    int x = (a * b + b * c + c * a) * 2;

    System.out.println(x > y ? 2 : 3);
  }

  public static void main(String[] args) {
    new Thread(null, new Runnable() {
      @Override
      public void run() {
        solve();
        out.flush();
      }
    }, "", 64000000).start();
  }

  private static PrintWriter out = new PrintWriter(System.out);
  private static StringTokenizer tokenizer = null;
  private static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 32768);

  public static String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  private static double nd() {
    return Double.parseDouble(next());
  }

  private static long nl() {
    return Long.parseLong(next());
  }

  private static int[] na(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++)
      a[i] = ni();
    return a;
  }

  private static char[] ns() {
    return next().toCharArray();
  }

  private static long[] nal(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++)
      a[i] = nl();
    return a;
  }

  private static int[][] ntable(int n, int m) {
    int[][] table = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[i][j] = ni();
      }
    }
    return table;
  }

  private static int[][] nlist(int n, int m) {
    int[][] table = new int[m][n];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[j][i] = ni();
      }
    }
    return table;
  }

  private static int ni() {
    return Integer.parseInt(next());
  }
}
0