結果
| 問題 | No.1298 OR XOR |
| コンテスト | |
| ユーザー |
キョウチク
|
| 提出日時 | 2022-05-15 09:48:32 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 464 bytes |
| 記録 | |
| コンパイル時間 | 2,939 ms |
| コンパイル使用メモリ | 83,328 KB |
| 実行使用メモリ | 49,656 KB |
| 最終ジャッジ日時 | 2026-04-03 16:31:52 |
| 合計ジャッジ時間 | 6,592 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 TLE * 1 -- * 8 |
ソースコード
import java.util.*;
public class Test10 {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String line;
line=sc.nextLine();
int c=Integer.parseInt(line);
int n=0;
for(int i=1;i<=c;i*=2){
n++;
}
int a=(int)Math.pow(2,n-1);
int b=c%a;
//System.out.println((b|c)+","+(a^b^c));
if(b==0){
System.out.println("-1 -1 -1");
}else{
System.out.println(a+" "+b+" "+c);
}
}
}
キョウチク