题目1036:Old Bill
来源:互联网 发布:linux 发送广播包 编辑:程序博客网 时间:2024/05/16 14:00
#include <iostream>#include <stdio.h>#include <algorithm>#include <math.h>#include <string>#include <string.h>#include <vector>#include <queue>#include <stack>#include <sstream>using namespace std;//1036int n,x,y,z; int main(){ // freopen("input.txt","r",stdin); while(cin>>n){ cin>>x>>y>>z; int maxn=0,a,b; for(int i=1;i<=9;i++) for(int j=0;j<=9;j++){ int t=i*10000+x*1000+y*100+z*10+j; if(t%n==0&&t/n>maxn) maxn=t/n,a=i,b=j; } if(maxn==0) cout<<0<<endl; else cout<<a<<" "<<b<<" "<<maxn<<endl; } return 0;}/************************************************************** Problem: 1036 User: cust123 Language: C++ Result: Accepted Time:0 ms Memory:1520 kb****************************************************************/
0 0
- 题目1036:Old Bill
- 题目1036:Old Bill
- 题目1036:Old Bill
- 题目1036:Old Bill
- 题目1036:Old Bill
- 九度OJ题目1036:Old Bill
- 九度OJ题目1036:Old Bill
- 题目1036 Old Bill 九度Online Judge
- old bill
- 九度OnlineJudge之1036:Old Bill
- 九度oj-1036-Old Bill
- 九度OJ-1036:Old Bill
- 九度oj-1036-old bill
- 九度OJ 1036:Old Bill
- zoj 2679 Old Bill
- zoj 2679 Old Bill
- 1036.Old Bill
- 九度OJ 1036 Old Bill (模拟)
- C-style 字符串小示例
- random
- 大数据背后的推荐系统(Big Data Behind Recommender Systems)
- iPhone Apple App Store购买应用后,不想买了,退款的方法
- cin.putback
- 题目1036:Old Bill
- 关于推荐系统中的冷启动问题探讨(Approaching the Cold Start Problem in Recommender Systems)
- 深入了解scanf/getchar/gets/cin等函数(转载)
- for /d /r /l /f
- 判断一个字符串是否对称
- python里面三个很有用的大小写处理方法
- 使用ifstream和getline读取文件内容[c++]
- 用Python构建你自己的推荐系统(Implementing your own recommender systems in Python)
- C++ limits头文件的用法(numeric_limits)