Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int q,w,e,i,j;
- char r,t,y;
- int main()
- {
- ifstream fin ("input.txt");
- ofstream fout ("output.txt");
- fin >> q >> w >> e >> r >> t >> y;
- if(q==w && w==e) i=1;
- if(q!=w && q!=e && w!=e) i=6;
- if(q==w && q!=e) i=3;
- if(q==e && q!=w) i=3;
- if(e==w && q!=e) i=3;
- if(r==t && r==y) j=1;
- if(r!=t && t!=y && r!=y) j=6;
- if(r==t && r!=y) j=3;
- if(t==y && r!=y) j=3;
- if(r==y && r!=t) j=3;
- i=i*j;
- fout << i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement