#include<iostream>
#include<algorithm>
#define MAXN 15
using namespace std; //int rec[MAXN]; int main()
{
//freopen("acm.acm","r",stdin);
int ans;
int x;
int y;
int dight_x;
int dight_y;
int i;
int rec;
while(cin>>x>>y)
{
if(!x&&!y)
break;
ans = ;
i = ;
rec = ;
while(y||x)
{
dight_x = x%;
dight_y = y%;
x /= ;
y /= ;
if(rec + dight_x + dight_y > )
{
rec = ;
++ ans;
}
else
rec = ;
}
if(ans == )
cout<<"No carry operation."<<endl;
else if(ans > )
cout<<ans<<" carry operations."<<endl;
else
cout<<ans<<" carry operation."<<endl;
}
}

POJ 2562的更多相关文章

  1. POJ 2562:Primary Arithmetic

    Primary Arithmetic Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11135   Accepted: 40 ...

  2. ZOJ 2562 HDU 4228 反素数

    反素数: 对于不论什么正整数x,起约数的个数记做g(x).比如g(1)=1,g(6)=4. 假设某个正整数x满足:对于随意i(0<i<x),都有g(i)<g(x),则称x为反素数. ...

  3. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  4. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  5. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  6. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  7. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  8. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  9. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

随机推荐

  1. (1)There's more to life than being happy

    https://www.ted.com/talks/emily_esfahani_smith_there_s_more_to_life_than_being_happy00:12 I used to ...

  2. Fortran编译器之一GUN Fortran安装(Windows XP)

    最近研究GIS算法,需要用到Fortran语言.在网上找了一下发现一个开源的软件GUN Fortran编译器.当然既然是编译器,就是编译出程序的,但是编辑器不包括在内.编辑器可以用Text记事本,或者 ...

  3. la3890(半平面交)

    蓝书半平面交例题 #include<iostream> #include<cstring> #include<cmath> #include<cstdio&g ...

  4. pyppeteer使用笔记

    pyppeteer -- python版本的puppeteer,一个强大的chronium headless浏览器API 最近搞天猫用了一波儿,记录一下. 先上文档: https://miyakogi ...

  5. 如何更改linux文件的拥有者及用户组(chown和chgrp)

    http://blog.csdn.net/hudashi/article/details/7797393 一.基本知识   在Linux中,创建一个文件时,该文件的拥有者都是创建该文件的用户.该文件用 ...

  6. svn本地如何切换账号

    SVN如何切换账号   在使用svn更新或提交数据时需要输入用户名和密码,在输入框中可以选择是否记录,以便下次操作无需再次输入用户名和密码: 要切换其他用户名时,需要删除已记录用户的数据,在电脑桌面上 ...

  7. JavaScript 获取鼠标点击位置坐标

    在一些DOM操作中我们经常会跟元素的位置打交道,鼠标交互式一个经常用到的方面,令人失望的是不同的浏览器下会有不同的结果甚至是有的浏览器下没结果,这篇文章就上鼠标点击位置坐标获取做一些简单的总结,没特殊 ...

  8. 一.认识python.变量.数据类型.条件if

    01.万恶之源-python基础 ⼀.python介绍  python的创始⼈为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决⼼ ...

  9. Maven的插件管理

    <pluginManagement> 这个元素和<dependencyManagement>相类似,它是用来进行插件管理的. 在我们项目开发的过程中,也会频繁的引入插件,所以解 ...

  10. SQL语句 删除表user 中字段name 内容重复的记录,

    public class T01 { public static void main(String[] args) { int j=4; j=j+=j-=j*=j; System.out.printl ...