精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • 英語翻譯

    英語翻譯
    Your Ride Is Here
    It is a well-known fact that behind every good comet is a UFO.These UFOs often come to collect loyal supporters from here on Earth.Unfortunately,they only have room to pick up one group of followers on each trip.They do,however,let the groups know ahead of time which will be picked up for each comet by a clever scheme:they pick a name for the comet which,along with the name of the group,can be used to determine if it is a particular group's turn to go (who do you think names the comets?).The details of the matching scheme are given below; your job is to write a program which takes the names of a group and a comet and then determines whether the group should go with the UFO behind that comet.
    Both the name of the group and the name of the comet are converted into a number in the following manner:the final number is just the product of all the letters in the name,where "A" is 1 and "Z" is 26.For instance,the group "USACO" would be 21 * 19 * 1 * 3 * 15 = 17955.If the group's number mod 47 is the same as the comet's number mod 47,then you need to tell the group to get ready!(Remember that "a mod b" is the remainder left over after dividing a by b; 34 mod 10 is 4.)
    Write a program which reads in the name of the comet and the name of the group and figures out whether according to the above scheme the names are a match,printing "GO" if they match and "STAY" if not.The names of the groups and the comets will be a string of capital letters with no spaces or punctuation,up to 6 characters long.
    英語人氣:668 ℃時間:2019-12-25 22:23:25
    優(yōu)質(zhì)解答
    你的旅行開始了
    眾所周知,每顆慧星后面都有不明飛行物(UFO). 這些不明飛行物常常在這里尋找忠誠的支持者. 不幸的是,他們每次旅行只有空間帶走一群支持者. 不過,他們總是通過一個聰明的方案讓這群人提前知道誰會被帶到哪個慧星上去: 他們?yōu)槊款w慧星取個名字,也給每個小組取個名, 這樣就能夠決定是否輪到該小組(你覺得誰會命名慧星呢?). 搭配方案的細節(jié)如下; 你的任務(wù)是編寫一個帶有小組和慧星的名字的程序,然后決定這個小組是否應(yīng)和UFO一起追隨慧星.
    小組和慧星的名字通過下面的辦法轉(zhuǎn)換成數(shù)字: 最終的數(shù)字是名字中字母所在字母表位置的乘積, 即A等于1,Z等于26. 例如,組"USACO" 應(yīng)該是21 * 19 * 1 * 3 * 15 = 17955. 如果組的余數(shù)47 與慧星的余數(shù)47相同, 你就可以告訴這個組準備出發(fā)了! (注意"a 除 b的余數(shù)" 是a 被b除后剩下的數(shù); 34 除以10 余 4.)
    編程讀出慧星和小組的名字并指出以上兩者是否相配, 如果相配輸出"GO"否則輸出 "STAY" . 小組和慧星的名字是一串不含標點和空格的大寫字母, 不超過6個字母.
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版