你的飛碟在這兒Your Ride Is He…
題目連結https://www.luogu.org/problemnew/show/P1200
#include<iostream> #include<cstring> #include<cstdio> using namespace std; char b[10],d[10]; int main() { long long a=1,r=1; scanf("%s",&b);scanf("%s",&d); int f = strlen(b); int g = strlen(d); for(int i = 0;i < f ;i++) { a=a*(b[i]-'A'+1); } for(int j = 0;j < g ;j++) { r=r*(d[j]-'A'+1); } if(a % 47 == r % 47 ) { printf("GO\n"); } else{ printf("STAY\n"); } return 0; }
相關推薦
P1200 [USACO1.1]你的飛碟在這兒Your Ride Is He… 小組名和彗星名都以下列方式轉換成一個數字:最終的數字就是名字中所有字母的積,其中AA是11,ZZ是2626。例如,USACOUSACO小組就是21 \times 19 \times 1 \times 3 \times 1
#include <stdio.h> #include <stdlib.h> int main() { int i, sum1, sum2, a1[6], a2[6]; char str1[7], str2[7]; //陣列開大一點,最多需要放六個字元外加一個字串結
你的飛碟在這兒Your Ride Is He…
題目連結https://www.luogu.org/problemnew/show/P1200 #include<iostream> #include<cstring> #include<cstdio> using namespace std; char b[
[USACO1.1]你的飛碟在這兒 Your Ride Is Here
題目描述 眾所周知,在每一個彗星後都有一隻UFO。這些UFO時常來收集地球上的忠誠支持者。不幸的是,他們的飛碟每次出行都只能帶上一組支持者。因此,他們要用一種聰明的方案讓這些小組提前知道誰會被彗星帶走。他們為每個彗星起了一個名字,通過這些名字來決定這個小組是不是被帶走的那個
Your Ride Is Here
Language calc who character letter ring detail als form It is a well-known fact that behind every good comet is a UFO. These UFOs often c
【字符串】Your Ride Is Here
lower ret icu rip none com groups collect ces 題目描述 It is a well-known fact that behind every good comet is a UFO. These UFOs often come t
USACO--Your Ride Is Here
Your Ride Is Here It is a well-known fact that behind every good comet is a UFO. These UFOs ofte
No new migrations found. Your system is up-to-date.處理
span system 記錄 new blog 相關操作 處理 style date 顯然是migrations表中存儲的相關操作記錄了,刪除就好了!!! No new migrations found. Your system is up-to-date.處理
iOS打包上傳ipa文件時,報錯<ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone apps......>的解決方案
splay update 分享圖片 trait tin log .com bmi graphic 很長一段時間習慣了用企業級證書發布,最近的新項目使用Xcode 9.1發布到AppStore時遇到了一個小問題(emm..其實問題跟Xcode版本沒關系,我也不知道為什麽要聲明
解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
context 錯誤 com sta spa can src 直接 代碼 原因是代碼直接放在默認包裏邊,比如src\main\java目錄下 應該在src\main\java下建立子目錄,比如src\main\java\com\test 這樣的話,代碼就在com.tes
Git報錯:Your branch is ahead of 'origin/master' by 1 commit
remote 倉庫 mas orm like mes reset director gin . commit之後,用git status,打印信息為: # On branch master # Your branch is ahead of ‘origin/maste
Could not get BatchedBridge, make sure your bundle is packaged correctly
最近在原生Android專案中整合React Native環境時,頻繁出現 com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged c
2018瀋陽J How Much Memory Your Code Is Using?
J How Much Memory Your Code Is Using? 字串模擬 #include<bits/stdc++.h> using namespace std; int main() { //freopen("in.txt","r",stdin);
Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctl
第一種:使用bundle命令:(缺點:後續沒辦法reload,只能重複生成bundle檔案) 1.在Android/app/src/main目錄下建立一個空的assets資料夾 2: 在工程根目錄下資料bundle命令: react-native bundle --platform
Springboot 中報錯 Your ApplicationContext is unlikely to start due to a @ComponentScan
用springboot 寫scala程式碼是最近做的一個專案,但是我啟動的時候拋了一個錯誤,具體就是Your ApplicationContext is unlikely to start due to a @ComponentScan of the default pack
genymotion報錯Your CPU is incompatible with virtualization technologies
genymotion日常報錯,以前也遇到過,始終解決不了,然後就使用android studio原生的模擬器,或者是使用真機. 但是很多時候還是很嚮往genymotion的感覺,然後發現版本是Ubuntu(32-bit),感覺不對啊= =,因為配置是64位的,同時報錯為不相
2018 ACM/ICPC 瀋陽站 J How Much Memory Your Code Is Using?
題目描述 In the C++ language, the values of variables are stored somewhere in the computer memory as zeros and ones. Our program does not nee
Ask HN: What Do You Do When Your Phone Is in the Shop for Repair?
I pull out an old phone from my drawer, swap the SIMs and live in the past for a couple of days. With most of my old smartphones I need
Why analysing your product is essential when ux
Yes, Flutter is known to enable “fast development” and “native performance” but for the UX and UI design it’s not “fast designing” or “native looking” with
Your Genome Is Pretty Worthless
Let’s imagine that I’ve stolen your genome.I’m a hacker — a black hat, someone who commits crimes using my skills on a computer. I earn my clandestine livi
Why your token is likely a bad investment & why Bitcoin scalability is secondary
What will people use the token for?Given that the technology itself is set to transfer much of the surplus to the users, the question that then needs to be