F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20612633_19313.cpp: In function 'int main()':
0_0_20612633_19313.cpp:2:323: error: 'strlen' was not declared in this scope
     using namespace std;int main(){    int t;    cin >> t;    while(t--)    {        char buf[120];        int n;         cin >> n;        int dz[22];        for(int j = 0; j < n; j++)        {            int cnt = 0;            int a=0, sum = 0;            getchar();            gets(buf);            int len = strlen(buf);            for(int i = 0; i < len; i++)            {                if(isdigit(buf[i]))                {                    a  = a * 10 + buf[i] - '0';                }                else                {                    sum += a;                    a  = 0;                }            }            dz[j] = sum;        }        double result = 0;        for(int i = 0 ; i < n; i++)        {            result += 1.0 / dz[i];        }        result = 1.0 / result;        printf("%.2lf\n", result);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 06:47:52, Gzip enabled