c024: P34 城市移動(108年第一梯次APCS試題)
Tags : Python
Accepted rate : 1人/1人 ( 100% ) [非即時]
評分方式:
Tolerant

最近更新 : 2024-12-06 09:27

Content

假設一個遊戲,有3個城市,玩家依亂數L在3個城市移動,移到城市1得L分,如果L是偶數則下一回合移到城市2,否則留在城市1;移到城市2得到2L分,如果L是3的倍數,下一回合移到城市3,否則前往城市1;移到城市3得分是L除以10的商,如果L是5的倍數,下一回合移到城市3,否則移到城市1。測試資料如下:
 4 1 //玩4回合,起始城市是1
 1 2 3 12 //四個亂數

Input
Output
Sample Input #1
4 1
1 2 3 12 10
Sample Output #1
input n a:input random:10
測資資訊:
記憶體限制: 64 MB
公開 測資點#0 (100%): 1.0s , <1K
Hint :
Tags:
Python
出處:
[管理者: zero(育達管理員) ]


ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」