百练oj 4146:数字方格
2017-04-05 15:27
295 查看
//@auther zhou //@Number 201408070203 //@start time: //@finish time: /*@此处注意: */ /* 测试数据 */ #include<iostream> #include<cstring> #include<vector> #include<cmath> #include<algorithm> using namespace std; int main(){ int n; cin>>n; int m=0; for(int a2=n;a2>=0;a2--){ for(int a3=n;a3>=0;a3--){ if((a2+a3)%3==0){ for(int a1=n;a1>=0;a1--){ if(((a1+a2+a3)%5==0)&((a1+a2)%2==0)){ m=max(m,a1+a2+a3); } } } } } cout<<m; return 0; }
相关文章推荐
- OpenJudge 4146:数字方格 java穷举法
- 百炼OJ:4146:数字方格
- 第十六周OJ-相同的数字
- 第十六周 OJ:有相同数字?
- 华为OJ——输入一行字符,分别统计出包含英文字母、空格、数字和其它字符的个数
- 期末刷oj ——用数字造数字
- 九度OJ 1074:对称平方数 (数字特性)
- ZZULI-oj 1157 985的数字难题 (数学小规律)
- 九度OJ 1106:数字之和 (基础题)
- 【zzuli-oj】-985的方格难题(DP)
- 华为OJ基础题-表示数字
- 九度OJ 1351 数组中只出现一次的数字
- 【华为OJ】颠倒数字
- Oj2-重复数字中寻找破坏重复次数的那个
- 九度OJ 1357:疯狂地Jobdu序列 (数字特性)
- 九度OJ 1089 数字反转
- Find a number HNUST OJ 1517 (位运算 判断一列数字中出现的唯一一个奇数数字)
- 华为OJ——表示数字
- 华为OJ平台——在字符串中找出连续最长的数字串
- 理解二分查找!!! 九度OJ-1534,数组中第K小的数字。