首页 > 学院 > 开发设计 > 正文

1058. A+B in Hogwarts (20)

2019-11-08 20:09:47
字体:
来源:转载
供稿:网友
#include<iostream>int main(){ using namespace std; int a, b, c, d, e, f; char x; cin >> a >> x >> b >> x >> c >> d >> x >> e >> x >> f; int temp=0; if (f + c >= 29) { c = c + f - 29;temp = 1; } else { c += f;temp = 0; } if (b + e + temp >= 17) { b = b + e + temp - 17; temp = 1;} else { b = b + e + temp;temp = 0; } a += d + temp; cout << a << "." << b << "." << c << endl;}
上一篇:如何查看HTTP请求头

下一篇:大数相加

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表