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

2021-08-19 03:51:53 字數 1201 閱讀 7400

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

time limit: 1000 ms memory limit: 65536 kib

submit statistic discuss

problem description

輸入乙個十進位製非負整數,將其轉換成對應的 r (2 <= r <= 9) 進製數,並輸出。

input

第一行輸入需要轉換的十進位製非負整數;

第二行輸入 r。

output

輸出轉換所得的 r 進製數。

sample input

1279

8 sample output

2377

hint

source

#include 

#include

typedef struct

sastack;

int sempty(sastack*s)

else

return0;}

void push(sastack*s,int key)

intpop(sastack*s)

return e1;

}void change(int num,int r)

else

while(!sempty(p))

printf("\n");

}}int main()

return0;}

/****

****

****

****

****

****

****

****

****

****

****

****

***user name: jk170427劉含

result: accepted

take time: 0ms

take memory: 180kb

submit time: 2018-04-20

19:53:11

****

****

****

****

****

****

****

****

****

****

****

****

****/

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

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