PRoblem Link:http://139.129.36.234/problem.php?id=1102
1 5 100样例输出
1 1 1 5 25 125 100 10000 1000000AC code:
#include<iostream>#include<algorithm>#include<stdio.h>#include<map>#include<math.h>#include<string.h>#include<queue>#include<vector>#include<set>#define LL long long#define exp 1e-9#define MAXN 1000010using namespace std;int main(){// freopen("D://in.txt","r",stdin); int n,m,k; scanf("%d%d%d",&m,&n,&k); printf("%-9d%-9d%-9d/n",m,m*m,m*m*m); printf("%-9d%-9d%-9d/n",n,n*n,n*n*n); printf("%-9d%-9d%-9d/n",k,k*k,k*k*k); return 0;}输出格式解析:
1 %d为整型的输出格式标识;2 -代表数据左对齐,如不加则默认右对齐;3 9表示输出占9位,不足部分补空格。
新闻热点
疑难解答