Code Forces 581 A. Vasya the Hipster(水~)
来源:互联网 发布:淘宝助手批量上传图片 编辑:程序博客网 时间:2024/06/06 06:35
Description
小明有a只红袜子和b只蓝袜子,小明喜欢一只脚红袜子一只脚蓝袜子,而小明每天换一次袜子,穿完一双袜子就扔掉,问小明最多有多少天可以一只脚红袜子一只脚蓝袜子,这些天之后小明还有多少天有袜子穿
Input
两个整数a和b
Output
输出小明穿一只红袜子一只蓝袜子的天数以及这些天之后还有多少天有袜子可以穿
Sample Input
3 1
Sample Output
1 1
Solution
纯净水~
Code
#include<stdio.h>int main(){ int a,b; while(~scanf("%d%d",&a,&b)) { int t; if(a<b) t=a,a=b,b=t; printf("%d %d\n",b,(a-b)/2); } return 0;}
0 0
- Code Forces 581 A. Vasya the Hipster(水~)
- CodeForces - 581A Vasya the Hipster (水)
- A. Vasya the Hipster
- CodeForces 581A Vasya the Hipster
- codeforces——581A——Vasya the Hipster
- Codeforces Round #322 A Vasya the Hipster
- Vasya the Hipster
- Codeforces Vasya the Hipster
- CodeForces 581A Vasya the Hipster(简单题)——Codeforces Beta Round #322 (Div. 2)
- Codeforces Round #322 (Div. 2)A. Vasya the Hipster
- Code Forces 584 C. Marina and Vasya(水~)
- Code Forces 592 A. PawnChess(水~)
- Code Forces 585 A. Gennady the Dentist(模拟)
- Code Forces 601 A. The Two Routes(Floyd)
- code forces 409A The Great Game
- Code Forces 560 A. Currency System in Geraldion(水~)
- Code Forces 559 A. Gerald's Hexagon(水~)
- Code Forces 538 A. Cutting Banner(水~)
- 设计模式心得小结(一)
- S3C2440 中断控制寄存器
- 集成测试
- linux 网络配置
- 黑马程序员————IO流简单应用:分隔文件、合并文件
- Code Forces 581 A. Vasya the Hipster(水~)
- select、poll、epoll之间的区别总结[整理]
- 查找
- notepad 记事本 calc 计算器等命令行常用命令
- C语言中内存对齐方式摘录
- Form表单中的action提交路径问题
- hdoj 连连看 1175 (bfs)
- strcpy,memset,memcpy区别
- SDUT 3019 电梯