»ó¼¼ÇÑ ¼³¸í Ç×»ó °¨»çµå¸³´Ï´Ù.^^
µÎ °¡Áö Áú¹®ÀÌ ÀÖ½À´Ï´Ù.
ù°,
ÆÄÀÏÀÔÃâ·Â ÀÚ°¡Áø´Ü1.À» ¾Æ·¡¿Í °°ÀÌ ÇÏ¿© Á¤¿Ã¿¡ äÁ¡À» ³Ö¾ú´õ´Ï..
-A Not allowed system call: runid:709367 : ÆÄÀÏÀ̳ª ÇÁ·Î¼¼½º µîÀÇ ÀÚ¿ø¿¡ °æ¿ì¿¡ ´ëÇÑ ¹«´Ü ¾×¼¼½º¸¦ È®ÀÎ
À̶ó´Â ¿¡·¯°¡ ¶å´Ï´Ù.
#include <stdio.h>
int main()
{
int i,a,b,sum=0;
FILE *in=fopen("input.txt","r");
FILE *out=fopen("output.txt","w");
fscanf(in,"%d %d",&a,&b);
for (i=a;i<=b;i++){
sum=sum+i;
}
fprintf(out,"%d",sum);
fclose(in);
fclose(out);
return 0;
}
ÇØ°á ¹æ¹ý Á» °¡¸£ÃÄ ÁÖ¼¼¿ä
µÑ°
Àú´Â ÇÁ·Î±×·¥À» © ¶§ ¼±¾ðÇÏ´Â ¹è¿°ú º»¹®ÀÇ ¹è¿(?)ÀÌ Ç×»ó Çò°¥¸³´Ï´Ù.
¿¹¸¦ µé¾î, char[20][10]À» Á¤ÀÇÇØ¾ß ³ªÁß¿¡ º»¹®¿¡¼ char[i]¸¦ ¾µ ¼ö ÀÖ´Â ÀÌÀ¯ °°Àº..
(char[20]À̶ó Á¤ÀÇÇÏ°í º»¹®¿¡ char[i]¸¦ »ç¿ëÇÏ¸é ¿À·ù°¡ ¶ß´õ¶ó±¸¿ä..)
´ëÇ¥ÀûÀÎ °ÍÀÌ ¾Æ·¡ ÇÁ·Î±×·¥ÀÔ´Ï´Ù.
ÆÄÀÏÀÔÃâ·Â ¹®Á¦3À» Á¦ »ý°¢´ë·Î ¸¸µé¾ú´Âµ¥
#include <stdio.h>
int main()
{
char na[100][20],imsi;
int i,j,po[100],ra[100]={1},cnt=0,imsi2[100];
for(i=0; ;i++){
scanf("%s %d",na[i],&po[i]);
cnt=cnt+1;
if (scanf("%s %d",na,&po)<2) break;
}
for (i=0;i<=cnt;i++){
for (j=0;j<=cnt;j++){
if (po[i]<po[j]){
ra[i]=ra[i]+1;
}
}
}
for (i=0;i<=cnt;i++){
for (j=0;j<=cnt;j++){
if (ra[i]<ra[j]){
imsi=na[i];
na[i]=na[j];
na[j]=imsi[i];
imsi2[i]=po[i];
po[i]=po[j];
po[j]=imsi2[i];
}
}
}
for (i=0;i<=cnt;i++){
printf("%s %4d %4d\n",na[i],po[i],ra[i]);
}
}
imsi°¡ invalid conversion from 'char*' to 'char' [-fpermissive]¶ó°í ¿À·ù°¡ ¶ß¸é °É¸³´Ï´Ù.
ÇÁ·Î±×·¥ ÀÛ¼º¿¡¼ ¹è¿ Á¤ÀǸ¦ ¾î¶»°Ô ÇØ¾ß ÇÏ´ÂÁö ¼³¸íÇØÁֽøé Á¤¸» °¨»çÇÏ°Ú½À´Ï´Ù.