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_26324275_5030.cpp:3:13: error: 's' does not name a type
             s[i]=(a*s[i-1]+b*s[i-2])%7;             for(j=1;j<i-1;j++)//第二个循环             {                 if(s[j-1]==s[i-1]&&s[j]==s[i]){                     T=i-j;                     break;                 }             }         }         n = n%T;         printf("%ld\n",s[n-1]);      }      return 0; }
             ^
0_0_26324275_5030.cpp:3:53: error: expected unqualified-id before 'for'
             s[i]=(a*s[i-1]+b*s[i-2])%7;             for(j=1;j<i-1;j++)//第二个循环             {                 if(s[j-1]==s[i-1]&&s[j]==s[i]){                     T=i-j;                     break;                 }             }         }         n = n%T;         printf("%ld\n",s[n-1]);      }      return 0; }
                                                     ^
0_0_26324275_5030.cpp:3:61: error: 'j' does not name a type
             s[i]=(a*s[i-1]+b*s[i-2])%7;             for(j=1;j<i-1;j++)//第二个循环             {                 if(s[j-1]==s[i-1]&&s[j]==s[i]){                     T=i-j;                     break;                 }             }         }         n = n%T;         printf("%ld\n",s[n-1]);      }      return 0; }
                                                             ^
0_0_26324275_5030.cpp:3:67: error: 'j' does not name a type
             s[i]=(a*s[i-1]+b*s[i-2])%7;             for(j=1;j<i-1;j++)//第二个循环             {                 if(s[j-1]==s[i-1]&&s[j]==s[i]){                     T=i-j;                     break;                 }             }         }         n = n%T;         printf("%ld\n",s[n-1]);      }      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-10-06 17:16:55, Gzip enabled