結果

問題 No.1298 OR XOR
ユーザー キョウチク
提出日時 2022-05-17 18:20:10
言語 Java
(openjdk 23)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 3,814 ms
コンパイル使用メモリ 85,620 KB
実行使用メモリ 42,596 KB
最終ジャッジ日時 2024-09-15 13:13:16
合計ジャッジ時間 7,235 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

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