資料結構實驗之棧與佇列一:進製轉換
time limit: 1000 ms memory limit: 65536 kib
problem description
輸入乙個十進位製非負整數,將其轉換成對應的 r (2 <= r <= 9) 進製數,並輸出。
input
第一行輸入需要轉換的十進位製非負整數;
第二行輸入 r。
output
輸出轉換所得的 r 進製數。
sample input
1279
8 sample output
2377
hint
source
#include
#include
int main()
while(i!=0)
printf("%d",a[--i]);
}else
printf("%d",n);//
0的任意進製均為0
return
0;}
資料結構實驗之棧與佇列一 進製轉換
problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。output 輸出轉換所得的 r 進製數。example input 1279 8 example output 23...
資料結構實驗之棧與佇列一 進製轉換
time limit 1000ms memory limit 65536kb submit statistic problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。out...
資料結構實驗之棧與佇列一 進製轉換
problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。output 輸出轉換所得的 r 進製數。example input 1279 8 example output 23...