Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t;
- cin>>t;
- while(t--)
- {
- string s;
- int lr=1, ud=1;
- cin>>s;
- for(int i=0;i<4;i++)
- {
- if(s[i]=='1' and i<2)
- {
- lr+=10;
- }
- if(s[i]=='1' and i>=2)
- {
- ud+=10;
- }
- }
- cout<<lr*ud<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment