結果
問題 |
No.1298 OR XOR
|
ユーザー |
![]() |
提出日時 | 2020-10-19 12:41:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 117 bytes |
コンパイル時間 | 651 ms |
コンパイル使用メモリ | 63,884 KB |
最終ジャッジ日時 | 2025-01-15 11:43:49 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
コンパイルメッセージ
main.cpp:2:7: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 2 | int n;main(){scanf("%d",&n);if(n&(n-1))printf("%d %d %d\n",n,n&-n, n&-n^n);else puts("-1 -1 -1");} | ^~~~ main.cpp: In function ‘int main()’: main.cpp:2:19: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 2 | int n;main(){scanf("%d",&n);if(n&(n-1))printf("%d %d %d\n",n,n&-n, n&-n^n);else puts("-1 -1 -1");} | ~~~~~^~~~~~~~~
ソースコード
#include<iostream> int n;main(){scanf("%d",&n);if(n&(n-1))printf("%d %d %d\n",n,n&-n, n&-n^n);else puts("-1 -1 -1");}