|  | 
|  | 
| вернуться в форум | I get WA on test 1 !!!!!!! :(( I tested my program several times but I can't find what's wrong with it please help !my program :
 
 
 #include<iostream>
 #include<stdio.h>
 using namespace std;
 
 int main()
 {
 char a[1000000];
 cin>>a;
 int i;
 int counter=0;
 int maxint=0;
 for(i=0;i<strlen(a);i++)
 {
 if(a[i]>64){
 if(maxint<a[i]-55)
 maxint=a[i]-55;
 counter+=a[i]-55; }
 else {
 if(maxint<a[i]-48)
 maxint=a[i]-48;
 counter+=a[i]-48; }
 }
 for(i=1;i<36;i++)
 {
 if((counter%i==0)&&(maxint<i))
 {
 cout<<i+1;
 return 0;
 }
 }
 cout<<"No solution.";
 return 0;
 
 }
 | 
 | 
|