資料結構實驗之棧與佇列一 進製轉換

2021-08-24 20:53:23 字數 555 閱讀 6700

資料結構實驗之棧與佇列一:進製轉換

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()

int j;

for(j=i-1; j>=0; j--)

printf("%d",a[j]);

}else

printf("%d",n);

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...