結果

問題 No.1298 OR XOR
ユーザー キョウチクキョウチク
提出日時 2022-05-17 18:20:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 3,559 ms
コンパイル使用メモリ 73,856 KB
実行使用メモリ 57,044 KB
最終ジャッジ日時 2023-10-13 17:17:56
合計ジャッジ時間 6,908 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
56,584 KB
testcase_01 AC 136 ms
56,632 KB
testcase_02 AC 135 ms
56,588 KB
testcase_03 AC 137 ms
56,872 KB
testcase_04 AC 138 ms
56,872 KB
testcase_05 AC 137 ms
57,044 KB
testcase_06 AC 138 ms
56,772 KB
testcase_07 AC 134 ms
56,816 KB
testcase_08 AC 136 ms
56,864 KB
testcase_09 AC 136 ms
56,952 KB
testcase_10 AC 149 ms
56,516 KB
testcase_11 AC 152 ms
56,964 KB
testcase_12 AC 152 ms
56,588 KB
testcase_13 AC 141 ms
56,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test11 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String line;
    line=sc.nextLine();
    int n=Integer.parseInt(line);
    long tmp;
    for(tmp=1;tmp<n;tmp*=2);
    int a=-1,b=-1,c=-1;
    if(tmp>n){
      tmp/=2;
      a=n;
      b=(int)tmp;
      c=a-b;
    }
    System.out.println(a+" "+b+" "+c);
    sc.close();
  }
}
0