結果

問題 No.3084 Identify f(x)
ユーザー yuusaan
提出日時 2025-03-16 17:37:10
言語 Java
(openjdk 23)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 2,821 ms
コンパイル使用メモリ 77,976 KB
実行使用メモリ 72,060 KB
平均クエリ数 3.00
最終ジャッジ日時 2025-04-04 20:50:36
合計ジャッジ時間 4,224 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("? 0");  
        Scanner scanner = new Scanner(System.in);
        int f0 = scanner.nextInt(); // 整数を受け取る
        System.out.println("? 1");  // 改行なしの出力
        scanner = new Scanner(System.in);
        int f1 = scanner.nextInt(); // 整数を受け取る
        System.out.println("! " + (f1-f0) + " " + f0);
    }
}
0