Advertisement
Guest User

L

a guest
Oct 25th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <fstream>
  2.  
  3. using namespace std;
  4.  
  5. int q,w,e,i,j;
  6. char r,t,y;
  7.  
  8. int main()
  9. {
  10. ifstream fin ("input.txt");
  11. ofstream fout ("output.txt");
  12.  
  13. fin >> q >> w >> e >> r >> t >> y;
  14. if(q==w && w==e) i=1;
  15. if(q!=w && q!=e && w!=e) i=6;
  16. if(q==w && q!=e) i=3;
  17. if(q==e && q!=w) i=3;
  18. if(e==w && q!=e) i=3;
  19.  
  20. if(r==t && r==y) j=1;
  21. if(r!=t && t!=y && r!=y) j=6;
  22. if(r==t && r!=y) j=3;
  23. if(t==y && r!=y) j=3;
  24. if(r==y && r!=t) j=3;
  25. i=i*j;
  26. fout << i;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement