#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. Codeforces Round #548 (Div. 2) D 期望dp + 莫比乌斯反演

    https://codeforces.com/contest/1139/problem/D 题意 每次从1,m中选一个数加入队列,假如队列的gcd==1停止,问队列长度的期望 题解 概率正着推,期望反 ...

  2. 威伦TK6070iQ触摸屏的使用

    A.TK6070iQ只支持U盘互相倒腾. TK6070iQ有2个串口Com1 (232) Com2 (485) U盘上传 需要选择COM2(485),因为上传后是PLC与触摸屏通过485通讯,协议选s ...

  3. TCP/IP协议(7):应用层

    应用层上协议有DNS.DHCP.HTTP.SSL/TLS.FTP.Telnet等. 1.DNS域名解析 DNS服务器用来解析域名从而获得对应IP地址,我们在对网络进行设置的时候如果DNS服务器没有设置 ...

  4. excel2007自定义菜单项学习

    参考: http://club.excelhome.net/thread-1288002-1-1.html http://club.excelhome.net/thread-709306-1-1.ht ...

  5. es6 字符串方法

    1.字符串的新方法  includes() 包含属性 startsWith() 头部开始是否包含 endWith() 字符串是否在尾部   ========三个返回值都为布尔值  第二参数为数字  e ...

  6. 多表更新时碰到的 ERROR 1292 (22007)隐式转换错误

    表结构如下: Create Table: CREATE TABLE `test_t2` ( `id` int(11) NOT NULL AUTO_INCREMENT, `customer_no` va ...

  7. Hibernate关联关系配置(一对多,一对一,多对多)

    一对多 创建两个类  Manager(一这一端) Worker(多这一端)  即一个经理下有多个员工 package com.hibernate.n21; import java.util.HashS ...

  8. SDIBT 2345 (3.2.1 Factorials 阶乘)

    Description N的阶乘写作N!表示小于等于N的所有正整数的乘积.阶乘会很快的变大,如13!就必须用32位整数类型来存储,70!即使用浮点数也存不下了.你的任务是找到阶乘最后面的非零位.举个例 ...

  9. C#-VS异常处理

    VS异常处理 常规 try     可能会产生异常的代码,当一行产生异常,这行下面的代码不执行,转到catch开始执行 catch(system.Exception e)      e.message ...

  10. How to fix "FAILURE DURING CONVERSION TO COFF: FILE INVALID OR CORRUPT"

    Error LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt appear ...