oj上运行错误,
/*
题目描述
今天是个好日子,整数小伙伴们又一起出来聚会了。大家商议决定:今天玩捉迷藏!
玩法很简单,就是把藏在一个长长的字符串中(任何两个人都不会并排藏在一起)数字伙伴找出来。
而且,因为伙伴们太多,只找到此次藏起来的最大的那个伙伴就可以了。并且,大家一致同意,
让“1”做第一个找人的人——当然,事先,他并不知道到底有哪些伙伴藏起来了……
游戏开始了。“1”是一个很聪明的人,很快,他就把最大的那个伙伴找出来了……
如果你是“1”,你能写个程序来解决这件事情么?
输入
只有一个字符串,这里面藏有很多的整数小伙伴。
输出
只有一个整数,表示藏在其中的最大的那个整数小伙伴的位置(整数第一个数字在原串中的位置)。
样例输入
*((*-a32AB342+//32143abAA
样例输出
17
*/
程序代码:#include <stdio.h>
#include <stdlib.h>
main()
{
char a[100],*s;
int i,number,temp,length,place,placetemp,flag;
i=-1;
length=-1;
number=temp=place=placetemp=flag=0;
s=(char *)malloc(100);
scanf("%s",s);
do
{ i++;
a[i]=*s;
length++;
s++;
}while(a[i]!='\0');
for(i=0;i<length;i++)
{
if(a[i]>='0' && a[i]<='9')
{
if(flag==0)
placetemp=i;
temp=temp*10+(a[i]-'0');
flag++;
}
else
{
if(flag!=0)
{
if(temp>number)
{
number=temp;
place=placetemp;
}
temp=0;
placetemp=0;
flag=0;
}
else
continue;
}
}
printf("%d\n",place+1);
}
运行正确,然而orz,在oj上挂了。。。
还有这个是什么意思???
Runtime Error:[ERROR] A Not allowed system call: runid:1508935 callid:20
TO FIX THIS , ask admin to add the CALLID into corresponding LANG_XXV[] located at okcalls32/64.h ,and recompile judge_client
Runtime Error:[ERROR] A Not allowed system call: runid:1508935 callid:20
TO FIX THIS , ask admin to add the CALLID into corresponding LANG_XXV[] located at okcalls32/64.h ,and recompile judge_client
辅助解释:
A Not allowed system call: runid:1508935 :使用了系统禁止的操作系统调用,看看是否越权访问了文件或进程等资源









