/ 科创班 /

记录详情

Time Exceeded


  
# 状态 耗时 内存占用
#1 Time Exceeded ≥1003ms ≥256.0 KiB
#2 Time Exceeded ≥1004ms ≥256.0 KiB
#3 Time Exceeded ≥1003ms ≥256.0 KiB
#4 Time Exceeded ≥1003ms ≥256.0 KiB
#5 Time Exceeded ≥1005ms ≥256.0 KiB
#6 Time Exceeded ≥1026ms ≥256.0 KiB
#7 Time Exceeded ≥1026ms ≥256.0 KiB
#8 Time Exceeded ≥1022ms ≥256.0 KiB
#9 Time Exceeded ≥1003ms ≥256.0 KiB
#10 Time Exceeded ≥1003ms ≥256.0 KiB

代码

#include <stdio.h>

int main()

{

char c;

int letters=0,space=0,digit=0,other=0;

while ((c=getchar())!='\n')

{

if (c >= 'a'&&c <= 'z')

{

letters++;

}
else if	( c >= 'A'&&c <= 'Z')
{

letters++;

}

else if (c == ' ')

{

space++;

}

else if (c >= '0'&&c <= '9')

{

digit++;

}

else

{

other++;

}

}

printf("%d,%d,%d,%d",letters,space,digit,other);

return 0;

}

信息

递交者
类型
递交
题目
5.4统计字符个数
题目数据
下载
语言
C
递交时间
2018-07-18 20:42:37
评测时间
2018-07-18 20:42:37
评测机
分数
0
总耗时
≥10102ms
峰值内存
≥256.0 KiB