結果
問題 |
No.1450 nahco314's First Problem
|
ユーザー |
|
提出日時 | 2021-04-03 13:08:52 |
言語 | Kuin (KuinC++ v.2021.9.17) |
結果 |
WA
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 8,179 ms |
コンパイル使用メモリ | 146,056 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 14:26:43 |
合計ジャッジ時間 | 3,875 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 36 WA * 1 |
ソースコード
func main() var n: int :: cui@inputInt() var ans: int :: -1 for i(n - 100, n + 100) if(i < 0) skip i end if if(f(i).xor(i $ bit64) = n $ bit64) do ans :: i break i end if end for do cui@print("\{ans}\n") func f(n: int): bit64 var res: int :: 0 while(n <> 0) if(n % 2 = 1) do res :+ 1 end if do n :/ 2 end while ret res $ bit64 end func end func