1058. A+B in Hogwarts (20):有疑惑-第三个测试点错误
来源:互联网 发布:广播电视台和广电网络 编辑:程序博客网 时间:2024/06/08 14:53
也考虑到数据的区间越界问题了···
#include<iostream>#include<cstring>#include<map>#include<string>#include<cmath>#include<algorithm>using namespace std;int main(){ int P_G, P_S, P_K; int A_G, A_S, A_K; char c; while(cin>>P_G>>c>>P_S>>c>>P_K) { cin>>A_G>>c>>A_S>>c>>A_K; long long P_Sum = P_G*17*29 + P_S*29 + P_K; long long A_Sum = A_G*17*29 + A_S*29 + A_K; int K = ( P_Sum + A_Sum )%29; int S = (( P_Sum + A_Sum )/29)%17; int G = (( P_Sum + A_Sum )/29)/17; cout<<G<<'.'<<S<<'.'<<K<<endl; } return 0;}
0 0
- 1058. A+B in Hogwarts (20):有疑惑-第三个测试点错误
- 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)
- 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)
- 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)
- PAT 1058. A+B in Hogwarts (20)
- LeetCode之Find Minimum in Rotated Sorted Array II
- Axis2 Web服务配置文件services.xml详解
- HDU2282Chocolate(KM匹配)
- android常用权限命令
- ubuntu禁用笔记本触摸板
- 1058. A+B in Hogwarts (20):有疑惑-第三个测试点错误
- ebs知识点100题
- Cocos2d-x从入门到精通第五课《Cocos2d-x中的Node》
- 数据结构与算法分析Java版练习1.14
- shell生成随机文件名
- 关于测试
- 【C++】双向链表
- gdb使用及原理【转】
- 由点击页面其它地方隐藏div所想到的jQuery的delegate