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為整型的輸出格式標(biāo)識(shí);2 -代表數(shù)據(jù)左對(duì)齊,如不加則默認(rèn)右對(duì)齊;3 9表示輸出占9位,不足部分補(bǔ)空格。
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注