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_14253041_17058.cpp:4:82: error: expected constructor, destructor, or type conversion before '(' token
 int t,n,i,a[31]; a[1]=1; a[2]=3; for(i=3;i<=31;i++) a[i]=2*a[i-2]+a[i-1]; } scanf("%d",&t); while(t--) { scanf("%d",&n); printf("%d\n",a[n]); }
                                                                                  ^
0_0_14253041_17058.cpp:4:93: error: expected unqualified-id before 'while'
 int t,n,i,a[31]; a[1]=1; a[2]=3; for(i=3;i<=31;i++) a[i]=2*a[i-2]+a[i-1]; } scanf("%d",&t); while(t--) { scanf("%d",&n); printf("%d\n",a[n]); }
                                                                                             ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-17 12:54:27, Gzip enabled