POJ 3983 快算24(水~)
来源:互联网 发布:java 6 jre 32位下载 编辑:程序博客网 时间:2024/06/05 07:07
Description
给定4个不大于10的正整数(范围1-10),要求在不改变数据先后顺序的情况下,采用加减乘除四种运算,找到一个表达式,使得最后的结果是24。
Input
4个不大于10的正整数。输入数据保证存在唯一解。
Output
不改变位置顺序,由’+’,’-‘,’*’,’/’4个运算符和’(‘,’)’组成的表达式
Sample Input
5 5 1 5
Sample Output
5*(5-(1/5))
Solution
此题直接做绝对是一道颇难的模拟题,但SB杯的只有一组用例决定了这道题能够成为仅次于a+b的超级大水题之一
Code
#include<stdio.h>int main(){ char s[10]; gets(s); puts("5*(5-(1/5))");}
0 0
- POJ 3983 快算24(水~)
- poj 3983 快算24
- poj 3983 快算24
- poj 3983 快算24
- POJ 3983:快算24
- POJ 3983 快算24
- POJ 3983 快算24
- POJ 3983 快算24
- poj 3983 快算24
- POJ-3983-快算24(简单模拟)
- POJ 3983 快算24 中文
- poj快算24 暴力
- 经典递归问题--快算24 POJ--3983
- POJ 2388(快排)
- POJ 3983 快算24 表达式模拟非常好的一个题
- POJ 3664 (qsort 快排)
- POJ 1002 487-3279(快排)
- acm-快算24(poj3983)暴力
- Oracle通过时间点快照来恢复数据
- Android开发:带progressBar效果的Button
- 打开和保存文件的对话框
- unity3d 4.X音频格式
- AdapterView与Adapter(五) --AsyncQueryHandler
- POJ 3983 快算24(水~)
- Linux文件vi操作
- IT行业的职称
- linux批量重命名之xargs
- 字符串重组
- NTFS For Mac完全读写小能手
- php中同时包含OR运算与AND运算
- Connection is read-only. Queries leading to data modification are not allowed
- makeKeyAndVisible