#include<iostream>
#include<cstdio>
#include<string>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
using namespace std;
#define ll long long
#define PII piar
signed main()
{
int T; cin>>T;
// ll n; cin>>n;
while(T--){
string s; cin>>s;
ll num1=0,num2=0,n=s.size();
for(ll i=0;i<n;i+=2){
num1=num1*10+(s[i]-('1'-1));
}
for(ll i=1;i<n;i+=2){
num2=num2*10+(s[i]-('1'-1));
}
ll ans=(num1+1)*(num2+1);
cout<<ans-2<<endl;
}
}
相关文章
- 11-18BestCoder Round #70 Jam's math problem(hdu 5615)
- 11-18习题:DZY Loves Math IV(杜教筛)
- 11-18数学模块_math
- 11-18leetcode-mid-math-371. Sum of Two Integers-NO-???
- 11-18Math02Practise
- 11-18常用类:math类
- 11-182021-09-10 Math&Date&Calendar类
- 11-18【BZOJ】3561: DZY Loves Math VI
- 11-18168. Excel Sheet Column Title (Math)
- 11-18[Math Review] Statistics Basics: Main Concepts in Hypothesis Testing