首页
学习
活动
专区
圈层
工具
发布
29 篇文章
1
PAT (Basic Level) Practice (中文)1047 编程团体赛
2
PAT (Basic Level) Practice (中文)1083 是否存在相等的差
3
PAT (Basic Level) Practice (中文)1082 射击比赛
4
PAT (Basic Level) Practice (中文)1081 检查密码
5
PAT (Basic Level) Practice (中文)1077 互评成绩计算
6
PAT (Basic Level) Practice (中文)1076 Wifi密码
7
PAT (Basic Level) Practice (中文)1064 朋友数
8
PAT (Basic Level) Practice (中文)1063 计算谱半径
9
PAT (Basic Level) Practice (中文)1057 数零壹
10
PAT (Basic Level) Practice (中文)1056 组合数的和
11
PAT (Basic Level) Practice (中文)1042 字符统计
12
PAT (Basic Level) Practice (中文)1041 考试座位号
13
PAT (Basic Level) Practice (中文)1023 组个最小数
14
PAT (Basic Level) Practice (中文)1022 D进制的A+B
15
PAT (Basic Level) Practice (中文)1019 数字黑洞
16
PAT (Basic Level) Practice (中文)1007 素数对猜想
17
PAT (Basic Level) Practice (中文)1091 N-自守数
18
PAT (Basic Level) Practice (中文)1026 程序运行时间
19
PAT (Basic Level) Practice (中文)1061 判断题
20
PAT (Basic Level) Practice (中文)1086 就不告诉你
21
PAT (Basic Level) Practice (中文)1016 部分A+B
22
PAT (Basic Level) Practice (中文)1012 数字分类
23
PAT (Basic Level) Practice (中文)1013 数素数
24
PAT (Basic Level) Practice (中文)1011 A+B 和 C
25
PAT (Basic Level) Practice (中文)1009 说反话
26
PAT (Basic Level) Practice (中文)1008 数组元素循环右移问题
27
PAT (Basic Level) Practice (中文)1006 换个格式输出整数
28
PAT (Basic Level) Practice (中文)1004 成绩排名
29
PAT (Basic Level) Practice (中文)1002 写出这个数

PAT (Basic Level) Practice (中文)1086 就不告诉你

1086 就不告诉你

做作业的时候,邻座的小盆友问你:“五乘以七等于多少?”你应该不失礼貌地围笑着告诉他:“五十三。”本题就要求你,对任何一对给定的正整数,倒着输出它们的乘积。

输入格式:

输入在第一行给出两个不超过 1000 的正整数 A 和 B,其间以空格分隔。

输出格式:

在一行中倒着输出 A 和 B 的乘积。

输入样例:

5 7

输出样例:

53

代码:

代码语言:javascript
复制
#include<stdio.h>
void fun(int n)
{
    int t=0;
    int arr[10000];
    while(n)
    {
        arr[t++]=n%10;
        n/=10;
    }
    print(&arr,t);
}

void print(int *arr,int n)
{
    int i;
    int sum=0;
    for(i=0;i<n;i++)
    {
        sum=sum*10+arr[i];
    }
    printf("%d\n",sum);
}
int main()
{
    int A,B;
    scanf("%d %d",&A,&B);
    if(A==0||B==0)printf("0\n");
    else fun(A*B);
    return 0;
}
下一篇
举报
领券