HDU 1017 A Mathematical Curiosity
来源:互联网 发布:java微信二次开发视频 编辑:程序博客网 时间:2024/05/21 06:46
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1017
怎么说呢,这的确是一道简单的不能再简单的数学题了....
只是这道题蛋疼的格式害我贡献了数次PE
下面是我的AC代码:
#include<iostream>using namespace std;int n,m,sum,t,k;int main(){ cin>>t; while(t--) { k=0; while(cin>>n>>m) { if(n==0&&m==0) break; sum=0; for(int i=1;i<n;i++) for(int j=i+1;j<n;j++) { int temp=i*i+j*j+m; int flag=i*j; if(temp%flag==0) sum++; } cout<<"Case"<<" "<<++k<<": "<<sum<<endl; } if(t!=0) cout<<endl; } return 0;}注意格式问题这道题就没什么了....^_^
0 0
- HDU 1017 A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- HDU 1017A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- HDU--1017--A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- HDU:1017 A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- hdu-1017-A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- hdu 1017 A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- HDU 1017 A Mathematical Curiosity
- servlet的工作流程
- Spiderman源码分析(五)Parser
- SGML中 DOCTYPE 声明
- Yomotsu 使用 THREE.js 创建的示例(Examples created by Yomotsu using THREE.js)
- CSS样式的优先级
- HDU 1017 A Mathematical Curiosity
- 第四章 函数和递归例题
- POJ1329-Circle Through Three Points
- sqlite数据库操作
- SDUT 1500 Message Flood(字典树 && 模板)
- hdu 3345 War Chess (bfs+优先队列)
- python 备忘录
- 安卓学习谱
- Populating Next Right Pointers in Each Node (LeetCode)