#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <string>
using namespace std;
int main(){
string s1;
string s2;
long m,n;
m=;
n=;
cin>>s1>>s2;
for(int i = ; i< s1.length(); i++)
{
m *= (int)s1[i] - (int)'A' + ;
} for(int i = ; i< s2.length(); i++)
{
n *= (int)s2[i] - (int)'A' +;
}
if(m % == n % )
cout<<"GO"<<endl<<"r1=r2="<<m%<<endl;
else
cout<<"STAY"<<endl<<"r1="<<m%<<"r2="<<n%<<endl;;
//cout<<m % 47 <<n % 47 <<endl;
//cout<<count<<endl; // cout<<setiosflags(ios::fixed)<<setprecision(4)<<s<<endl;
// cout<< setiosflags(ios::fixed)<<setprecision(4) <<c<<endl;
}

1004: 不明飞行物(ufo)的更多相关文章

  1. 1064: 不明飞行物(ufo)

    #include<iostream> #include<string> using namespace std; int main(){ string a,b ; long m ...

  2. 【USACO 1.1.1】你的飞碟在这儿

    [问题描述] 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO. 这些不明飞行物时常来收集来自在地球上忠诚的支持者. 不幸地,他们的空间在每次旅行只能带上一群支持者. 他们要做的是用一种聪明的 ...

  3. usaco1.1.1Your Ride Is Here(入门题)

    一下是我很久很久之前刷的题目...随便扔在这里啦.. Description 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO.这些不明飞行物时常来收集来自在地球上忠诚的支持者.不幸的是,他们 ...

  4. C++算法代码——你要乘坐的飞碟在这里[usaco]

    题目来自:http://218.5.5.242:9018/JudgeOnline/problem.php?id=1056 题目描述 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO. 这些不明 ...

  5. in+sb's+基数词的复数形式|UFO|the minutes|

    Hawking became world-famous in ________.  A. his thirties in the 1970's  B. the thirties in his 1970 ...

  6. bzoj 1004 Cards

    1004: [HNOI2008]Cards Description 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种颜色:红色,蓝色,绿色.他询问Sun有 多少种染色方案,Sun ...

  7. Codeforces Round #262 (Div. 2) 1004

    Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory lim ...

  8. 1004. Counting Leaves (30)

    1004. Counting Leaves (30)   A family hierarchy is usually presented by a pedigree tree. Your job is ...

  9. 网络虚拟化中的 offload 技术:LSO/LRO、GSO/GRO、TSO/UFO、VXLAN

    offload 现在,越来越多的网卡设备支持 offload 特性,来提升网络收/发性能.offload 是将本来该操作系统进行的一些数据包处理(如分片.重组等)放到网卡硬件中去做,降低系统 CPU ...

随机推荐

  1. python测试开发django-43.session机制(登录/注销)

    前言 当我们登录访问一个网站时,服务器需要识别到你已经登录了,才有相应的权限访问登录之后的页面.用户退出登录后,将无权限访问再访问登录后的页面. 从登录到退出的一整个流程,可以看成是与服务器的一次会话 ...

  2. 解决javamail ssl 测试unable to find valid certification path to requested target

    运行 java InstallCert smtp.interdrp.com:465 得到jssecacerts文件后复制到jdk1.6.0_14\jre\lib\security目录 然后再发送邮件就 ...

  3. Cocos2d-x V2.x版本对64bit的支持

    2015年2月1日后新提交的应用必须要支持64位架构. 我所使用的是cocos2d-x V2.0版本,而且源码有部分代码是修改过的.好在cocos2d-x官方已经放出了一个支持64位的2.2.6版本, ...

  4. Library drmframework_jni not found

    http://piotrbuda.eu/2012/06/trying-to-solve-error-491-in-play-store-on-android-emulator.html http:// ...

  5. 开源项目MultiChoiceAdapter详解(三)——MulitChoiceNormalArrayAdapter的使用

    MulitChoiceNormalArrayAdapter是我自己定义的一个类,其实就是实现了MulitChoiceArrayAdapter,为什么做这个简单的实现类呢,因为这样我们在不用Action ...

  6. 指定文件兼容性模式 < meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />的意义

    X-UA-Compatible是神马? X-UA-Compatible是IE8的一个专有<meta>属性,它告诉IE8采用何种IE版本去渲染网页,在html的<head>标签中 ...

  7. SQL Server跨服务器查询的实现方法,OpenDataSource

    SQL Server跨服务器查询的方法我们经常需要用到,下面就为您介绍两种SQL Server跨服务器查询的方法,如果您感兴趣的话,不妨一看. SQL Server跨服务器查询方法一:用OPENDAT ...

  8. [leetcode]Remove Duplicates from Sorted Array II @ Python

    原题地址:https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ 题意: Follow up for &quo ...

  9. 什么是L2 frame?

    The data link layer or layer 2 is the second layer of the seven-layer OSI model of computer networki ...

  10. Valid Number leetcode java

    题目: Validate if a given string is numeric. Some examples: "0" => true " 0.1 " ...