1058.A+B in Hogwarts
来源:互联网 发布:合同翻译的软件 编辑:程序博客网 时间:2024/04/29 23:11
【题意】
在给定进制下的两数相加
【思路】
直接加即可
#include <iostream>#include <cstdio>using namespace std;int main(int argc, char const *argv[]){int Galleon[2],Sickle[2],Knut[2];for(int i=0; i<2; i++){scanf("%d.%d.%d", &Galleon[i], &Sickle[i], &Knut[i]);}Knut[0] += Knut[1];Sickle[0] = Sickle[0]+Sickle[1]+Knut[0]/29;Knut[0] %=29;Galleon[0] = Galleon[0]+Galleon[1]+Sickle[0]/17;Sickle[0] %=17;cout << Galleon[0] << '.' << Sickle[0] << '.' << Knut[0];system("pause");return 0;}
0 0
- 1058. A+B in Hogwarts
- 1058. A+B in Hogwarts
- 1058.A+B in Hogwarts
- 1058. A+B in Hogwarts
- 1058. A+B in Hogwarts
- 1058. A+B in Hogwarts
- A+B in Hogwarts
- A+B in Hogwarts
- A+B in Hogwarts
- PAT-A 1058. A+B in Hogwarts
- 1058. A+B in Hogwarts (20)- PAT
- 【PAT】1058. A+B in Hogwarts (20)
- 1058. A+B in Hogwarts (20)
- 1058. A+B in Hogwarts (20)
- 1058. A+B in Hogwarts (20)
- PAT 1058. A+B in Hogwarts (20)
- 1058. A+B in Hogwarts (20)
- 1058. A+B in Hogwarts (20)
- Android 手机适配
- SpringMVC常用基础知识
- linux下管道重定向详解
- APUE课后习题10.6练习代码
- 日语范文
- 1058.A+B in Hogwarts
- 北京一辽金时代古墓被盗 官方称不属于文物
- 16.变量类型 自动变量 静态变量 寄存器变量
- 经典模拟电路仿真
- html5中css3新添加的动画效果
- android 打包 问题 出错 不能打包
- android 控件传值
- 解决Ubuntu终端中文乱码显示问题
- cocos2d-x 游戏开发之有限状态机(FSM) (一)