Search found 2 matches
- Tue May 15, 2012 6:44 pm
- Forum: Volume 122 (12200-12299)
- Topic: 12289 - One-Two-Three
- Replies: 12
- Views: 9832
Re: 12289 Why wa
#include <iostream> #include <string> #include<cstdio> #include<cmath> using namespace std; int main () { int i,j,n,l,k; string a; string th="three"; scanf("%d",&n); for(i=1; i<=n; i++) { cin>>a; k=0; l=a.length(); if(l==5) { for(j=0;j<5;j++) { if(a[j]==th[j]) k++; } if(k==4) printf("3"); } else if(...
- Tue May 15, 2012 6:43 pm
- Forum: Volume 122 (12200-12299)
- Topic: 12289 - One-Two-Three
- Replies: 12
- Views: 9832
12289 - One-Two-Three
#include <iostream> #include <string> #include<cstdio> #include<cmath> using namespace std; int main () { int i,j,n,l,k; string a; string th="three"; scanf("%d",&n); for(i=1; i<=n; i++) { cin>>a; k=0; l=a.length(); if(l==5) { for(j=0;j<5;j++) { if(a[j]==th[j]) k++; } if(k==4) printf("3"); } else if(...