九度:1036<枚举>
来源:互联网 发布:怎样使用ps软件 编辑:程序博客网 时间:2024/04/27 23:22
// 九度:1036//////#include <stdio.h>int main(){#ifdef ONLINE_JUDGE#elsefreopen("E:\\in.txt", "r", stdin);//freopen("E:\\out.txt", "w", stdout);#endifint n;while(scanf("%d", &n) != EOF){int x , y, z;scanf("%d%d%d", &x, &y, &z);int t = x*1000 + y*100 + z*10;int max=0, t1, t2;for(int i=1; i<=9; i++){for(int j=0; j<=9; j++){int totalprice = i*10000 + t + j;if(totalprice%n == 0){int per = totalprice/n;if(per > max){max=per;t1 = i;t2 = j;}}}}if(max != 0){printf("%d %d %d\n", t1, t2, max);}else{printf("0\n");}}//whilereturn 0;}
0 0
- 九度:1036<枚举>
- 九度:1045<百鸡问题><枚举>
- Swift(九、枚举)
- 九度OJ 1149:子串计算 暴力枚举
- 九度oj 1036
- 九度OJ 1375 陈博的完美主义 (枚举,细心细心)
- 并查集例题【hdu1232畅通工程,九度1444,hdu5631枚举删除边】
- 学习Swift笔记 (九)枚举
- 【Swift】学习笔记(九)——枚举
- 【C++】学习笔记九——枚举
- 【九度OJ】1036【模拟】
- 九、结构体、共用体与枚举 十、位运算
- UWP入门(九)-- 枚举和查询文件和文件夹
- 九度OnlineJudge之1036:Old Bill
- 九度OJ题目1036:Old Bill
- 九度oj-1036-Old Bill
- 九度OJ-1036:Old Bill
- 九度oj-1036-old bill
- Unity3D移动平台内存优化
- myeclipse项目转化成eclipse项目
- I must learn something new everyday!
- C语言与Java语言产生整型随机数的区别
- 第一次电面的感想
- 九度:1036<枚举>
- 通过WSAEVENT事件替代socket多线程
- django 简易博客开发 3 静态文件、from 应用与自定义
- 九度:1456 <BFS><胜利大逃亡>
- 初到csdn,准备学习一下php
- 从U盘安装windows/linux操作系统
- python学习笔记2
- Longest Consecutive Sequence
- 享元模式