제출 #225708

#제출 시각아이디문제언어결과실행 시간메모리
225708maomao90Popcount (COCI19_popcount)C++14
0 / 110
5 ms384 KiB
#include <cstdio> using namespace std; int N, K; int main() { scanf("%d%d", &N, &K); for (int i = 1; i <= N; i++) { if (i % 4 == 1) { if (i != 1) printf("A&((1<<%d)-1-(1<<%d)-1)\n", N + 1, i); printf("A="); } printf("(A&(1<<%d))>>%d+", i, i); } printf("A&((1<<%d)-1)\n", N / 4 * 4 + 1); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

popcount.cpp: In function 'int main()':
popcount.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &N, &K);
     ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...