結果
| 問題 | No.1450 nahco314's First Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-31 15:15:42 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 192 bytes |
| 記録 | |
| コンパイル時間 | 594 ms |
| コンパイル使用メモリ | 74,316 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-08 17:57:19 |
| 合計ジャッジ時間 | 2,396 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
long X;
main()
{
cin>>X;
for(int i=1;i<61;i++)
{
if(__builtin_popcountll(X^i)==i)
{
cout<<(X^i)<<endl;
return 0;
}
}
cout<<-1<<endl;
}