Search found 1 match

by rabbyprimoc2
Mon Mar 09, 2015 12:46 am
Forum: Volume 109 (10900-10999)
Topic: 10922 - 2 the 9s
Replies: 38
Views: 14058

Why WA !!!!!!

#include<bits/stdc++.h> using namespace std; int main() { char a[100000]; int i,j,k,l,n,m,sum,copy1,count1,x; while(scanf("%s",&a)==1) { bool ll = false; sum = 0; copy1 = 0; count1 = 0; x= 0 ; l = strlen(a); if(l==1 && a[0]=='0') break; for(i=0;i<l;i++) sum = sum + a[i]-'0'; if(sum%9 ==0 ) { ll = t...

Go to advanced search