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_1793737_10809\Main.java:2: 非法字符: \35
#include<iostream>using namespace std;int main(){ int n;//控制输入次数 cin>>n;  while(n--) {      if(n+1>0&&n<20)     {      char a[1200],b[1200];//输入的字符串      cin>>a>>b;      int i;      static int ca=1;//控制输出case#         int c[1200]={0};      int d[1200]={0};//转换字符串到int型,并且反转      int sum[1200]={0};//输出数组      int length1=strlen(a);      int length2=strlen(b);      for(i=0;i<length1;i++)      {       c[length1-1-i]=a[i]-'0';      }      for(i=0;i<length2;i++)      {       d[length2-1-i]=b[i]-'0';      }      for(i=0;i<1199;i++)      {       sum[i]=sum[i]+c[i]+d[i];       if(sum[i]>=10)       {        sum[i]=sum[i]-10;        sum[i+1]=1;       }      }      cout<<"Case"<<' '<<ca<<':'<<endl;      cout<<a<<" + "<<b<<" = ";      bool flag=0;      for(i=1199;i>=0;i--)      {       if(sum[i]!=0)       {        flag=1;       }       if(flag==1)       {        cout<<sum[i];       }      }      if(flag==0)      {       cout<<'0';      }      cout<<endl;      if(n)       cout<<endl;      ca++;     }     else break;//用来当n超出20时,退出的*/ } return 0;}
^
0_0_1793737_10809\Main.java:2: 需要为 class、interface 或 enum
#include<iostream>using namespace std;int main(){ int n;//控制输入次数 cin>>n;  while(n--) {      if(n+1>0&&n<20)     {      char a[1200],b[1200];//输入的字符串      cin>>a>>b;      int i;      static int ca=1;//控制输出case#         int c[1200]={0};      int d[1200]={0};//转换字符串到int型,并且反转      int sum[1200]={0};//输出数组      int length1=strlen(a);      int length2=strlen(b);      for(i=0;i<length1;i++)      {       c[length1-1-i]=a[i]-'0';      }      for(i=0;i<length2;i++)      {       d[length2-1-i]=b[i]-'0';      }      for(i=0;i<1199;i++)      {       sum[i]=sum[i]+c[i]+d[i];       if(sum[i]>=10)       {        sum[i]=sum[i]-10;        sum[i+1]=1;       }      }      cout<<"Case"<<' '<<ca<<':'<<endl;      cout<<a<<" + "<<b<<" = ";      bool flag=0;      for(i=1199;i>=0;i--)      {       if(sum[i]!=0)       {        flag=1;       }       if(flag==1)       {        cout<<sum[i];       }      }      if(flag==0)      {       cout<<'0';      }      cout<<endl;      if(n)       cout<<endl;      ca++;     }     else break;//用来当n超出20时,退出的*/ } return 0;}
                                      ^
2 错误


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-30 00:28:05, Gzip enabled