結果
問題 | No.1298 OR XOR |
ユーザー | キョウチク |
提出日時 | 2022-05-15 09:48:32 |
言語 | Java21 (openjdk 21) |
結果 |
TLE
|
実行時間 | - |
コード長 | 464 bytes |
コンパイル時間 | 5,787 ms |
コンパイル使用メモリ | 73,388 KB |
実行使用メモリ | 56,948 KB |
最終ジャッジ日時 | 2023-10-01 04:27:38 |
合計ジャッジ時間 | 12,838 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 164 ms
56,948 KB |
testcase_01 | AC | 123 ms
55,580 KB |
testcase_02 | AC | 123 ms
55,664 KB |
testcase_03 | AC | 123 ms
56,192 KB |
testcase_04 | AC | 119 ms
55,968 KB |
testcase_05 | TLE | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
ソースコード
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); } } }