外贸自建站平台怎么找,如何做ps4的游戏视频网站,长沙cms模板建站,开发app需要公司吗文章目录 题目题面翻译输入格式输出格式 题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 思路AC代码 题目
题面翻译
有一个算式 a b a{}b ab #xff0c; a a a 、 b b b 都是一位数。你需要输出这个算式的答案。
输入格式
第一行#xff0c;一个整数 t t t … 文章目录 题目题面翻译输入格式输出格式 题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 思路AC代码 题目
题面翻译
有一个算式 a b a{}b ab a a a 、 b b b 都是一位数。你需要输出这个算式的答案。
输入格式
第一行一个整数 t t t ( 1 ≤ t ≤ 100 1\le t\le100 1≤t≤100 ) 表示输入的算式个数。
下面 t t t 行每行一个 a b a{}b ab 的算式注意加号旁边没有空格。( 0 ≤ a , b ≤ 9 0\le a,b\le9 0≤a,b≤9 a a a 和 b b b 都是整数 )
输出格式
对于每个算式输出这个算式的结果。
题目描述
You are given an expression of the form a b a{}b ab , where a a a and b b b are integers from 0 0 0 to 9 9 9 . You have to evaluate it and print the result.
输入格式
The first line contains one integer t t t ( 1 ≤ t ≤ 100 1 \le t \le 100 1≤t≤100 ) — the number of test cases.
Each test case consists of one line containing an expression of the form a b a{}b ab ( 0 ≤ a , b ≤ 9 0 \le a, b \le 9 0≤a,b≤9 , both a a a and b b b are integers). The integers are not separated from the sign.
输出格式
For each test case, print one integer — the result of the expression.
样例 #1
样例输入 #1
4
42
00
37
89样例输出 #1
6
0
10
17思路
循环 1 1 1~ n n n直接输入输出就好了
AC代码
#include bits/stdc.h
using namespace std;
int main(){int t,a,b;char c;scanf(%d,t);while(t--){scanf(%d%c%d,a,c,b);printf(%d\n,ab);}return 0;
}