為了更好地能將中華五千年文化融入到科技教育中,他們決定到遠古時期去走一走。他們知道杭州黃龍洞有一座傳
送陣,可以傳送到古代。那天,他們來到了黃龍洞,發現傳送陣上有四個按鈕,每個按鈕上有個算式,說出2個正
整數a和b,然後代入這個算式,計算出來的結果如果能被2整除,那麼他們將回到夏朝,如果能被3整除,他們將回
到漢朝,如果能被5整除,他們將回到唐朝,能被7整除,他們將回到元朝,如果上述情況都不行,傳送送將不起作
用,如果能被多個整除,將按上述順序第乙個的生效。現在知道這四個算式為
(1)2a+3b-7ab
(2)5a+9
(3)7a-4b
(4)ab
輸入3個正整數,分別為a b和算式號
輸出分2行,第1行輸出算式的值,第2行根據傳送朝代輸出拼音,
夏朝 漢朝 唐朝 元朝 未能傳送
xia han tang yuan wei
1 3 2
14
xia
l1之題,水題無題解。(只要n個if)
#includeint main() else if(s%3==0) else if(s%5==0) else if(s%7==0) else if((s%2==0&&s%5==0)||(s%2==0&&s%7==0)||(s%2==0&&s%3==0)||(s%3==0&&s%5==0)||(s%3==0&&s%7==0)||(s%5==0&&s%7==0)||(s%2==0&&s%3==0&&s%4==0)||(s%2==0&&s%3==0&&s%5==0)||(s%2==0&&s%4==0&&s%5==0)||(s%3==0&&s%4==0&&s%5==0)) else if(s%2!=0&&s%3!=0&&s%5!=0&&s%7!=0)
} s=0;
if(c==2) else if(s%3==0) else if(s%5==0) else if(s%7==0) else if((s%2==0&&s%5==0)||(s%2==0&&s%7==0)||(s%2==0&&s%3==0)||(s%3==0&&s%5==0)||(s%3==0&&s%7==0)||(s%5==0&&s%7==0)||(s%2==0&&s%3==0&&s%4==0)||(s%2==0&&s%3==0&&s%5==0)||(s%2==0&&s%4==0&&s%5==0)||(s%3==0&&s%4==0&&s%5==0)) else if(s%2!=0&&s%3!=0&&s%5!=0&&s%7!=0)
} s=0;
if(c==3) else if(s%3==0) else if(s%5==0) else if(s%7==0) else if((s%2==0&&s%5==0)||(s%2==0&&s%7==0)||(s%2==0&&s%3==0)||(s%3==0&&s%5==0)||(s%3==0&&s%7==0)||(s%5==0&&s%7==0)||(s%2==0&&s%3==0&&s%4==0)||(s%2==0&&s%3==0&&s%5==0)||(s%2==0&&s%4==0&&s%5==0)||(s%3==0&&s%4==0&&s%5==0)) else if(s%2!=0&&s%3!=0&&s%5!=0&&s%7!=0)
} s=0;
if(c==4) else if(s%3==0) else if(s%5==0) else if(s%7==0) else if((s%2==0&&s%5==0)||(s%2==0&&s%7==0)||(s%2==0&&s%3==0)||(s%3==0&&s%5==0)||(s%3==0&&s%7==0)||(s%5==0&&s%7==0)||(s%2==0&&s%3==0&&s%4==0)||(s%2==0&&s%3==0&&s%5==0)||(s%2==0&&s%4==0&&s%5==0)||(s%3==0&&s%4==0&&s%5==0)) else if(s%2!=0&&s%3!=0&&s%5!=0&&s%7!=0)
} return 0;
}
lua 遊戲開發 傳送)傳送陣例項
teleport moveto teleport 在同乙個場景裡的玩家會受到遊戲迴圈的影響,可以通過teleport的方式,在不同場景制定不同的自然法則,燈光等。moveto 在同乙個place下的移動 這裡將說明如何建立乙個不同的場景並傳送。也會對簡單帶 teleport的指向是place的話,玩...