Wrong Answer

seokma97 Reply 9 years 31 weeks ago
#include <stdio.h> void bit_convert(int num, int *arr){ int koe,index=0; while (1){ koe = num % 2; arr[index++] = koe; num /= 2; if (num==0) break; } while (index < 32) arr[index++]=0; } int main() { int x,y,p,n; int a[32],b[32]; scanf("%d\n%d\n%d\n%d",&x,&y,&p,&n); bit_convert(x,a); bit_convert(y,b); for (int i=31; i>(31-n); i--) a[p]=b[i]; for (int i=0;i<32;i++) printf("%d",a[i]); return 0; } Wrong Answer가 나는 이유를 잘 모르겠습니다!
pichulia Reply 9 years 31 weeks ago
예제는...돌려보고...옵....ㅅ.......