1004: 不明飞行物(ufo)
#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)的更多相关文章
- 1064: 不明飞行物(ufo)
#include<iostream> #include<string> using namespace std; int main(){ string a,b ; long m ...
- 【USACO 1.1.1】你的飞碟在这儿
[问题描述] 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO. 这些不明飞行物时常来收集来自在地球上忠诚的支持者. 不幸地,他们的空间在每次旅行只能带上一群支持者. 他们要做的是用一种聪明的 ...
- usaco1.1.1Your Ride Is Here(入门题)
一下是我很久很久之前刷的题目...随便扔在这里啦.. Description 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO.这些不明飞行物时常来收集来自在地球上忠诚的支持者.不幸的是,他们 ...
- C++算法代码——你要乘坐的飞碟在这里[usaco]
题目来自:http://218.5.5.242:9018/JudgeOnline/problem.php?id=1056 题目描述 一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO. 这些不明 ...
- in+sb's+基数词的复数形式|UFO|the minutes|
Hawking became world-famous in ________. A. his thirties in the 1970's B. the thirties in his 1970 ...
- bzoj 1004 Cards
1004: [HNOI2008]Cards Description 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种颜色:红色,蓝色,绿色.他询问Sun有 多少种染色方案,Sun ...
- 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 ...
- 1004. Counting Leaves (30)
1004. Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is ...
- 网络虚拟化中的 offload 技术:LSO/LRO、GSO/GRO、TSO/UFO、VXLAN
offload 现在,越来越多的网卡设备支持 offload 特性,来提升网络收/发性能.offload 是将本来该操作系统进行的一些数据包处理(如分片.重组等)放到网卡硬件中去做,降低系统 CPU ...
随机推荐
- 查询并发程序是否启动跟踪功能-trc文件对数据库性能有影响
/* Formatted on 2018/3/14 23:38:51 (QP5 v5.256.13226.35538) */ SELECT icon_name , row_id , user_conc ...
- 查看Android源码版本
from://http://www.cnblogs.com/flyme/archive/2011/10/14/2211143.html 有时候我们辛苦取到Android的源代码,想知道它的确切版本号, ...
- 为python安装matplotlib模块
matplotlib是python中强大的画图模块. 首先确保已经安装python,然后用pip来安装matplotlib模块. 进入到cmd窗口下,执行python -m pip install - ...
- Android中获取屏幕长宽的方法
package com.kale.screen; import android.annotation.SuppressLint; import android.app.Activity; import ...
- Asp.Net Core 静态文件目录操作
一.默认静态文件处理 Asp.Net Core的默认处理方式,将所有的静态文件都放在wwwroot文件夹中 1.默认配置,在启动文件Startup中 public void Configure(IAp ...
- 深入分析Java的编译原理
在<Java代码的编译与反编译>中,有过关于Java语言的编译和反编译的介绍.我们可以通过javac命令将Java程序的源代码编译成Java字节码,即我们常说的class文件.这是我们通常 ...
- LaTeX使用技巧
使用LaTex的方法: (1)推荐一个手写公式.自动生成LaTex的网站——Web Equation. (2)如果会LaTex,可以直接用在线LaTex编辑 (3)从mathtype转换: 首先打开文 ...
- 第三方IDC性能测评主要指标
弹性计算性能弹性计费模式就是 "即用即付 ",最小单位可以按小时来计算.随着云计算负载的增长,企业购买服务器带宽时的资源. 1.弹性计算性能 弹性计费模式就是"即 ...
- HttpAsyncClient的连接池使用
代码示例 public static void main(String[] args) throws Exception { ConnectingIOReactor ioReactor = new D ...
- maven-assembly-plugin 入门指南
当你使用 Maven 对项目打包时,你需要了解以下 3 个打包 plugin,它们分别是 plugin function maven-jar-plugin maven 默认打包插件,用来创建 proj ...