
OJ入门引导
薛定谔又死又生的猫
一天一题!
展开
-
HDOJ 2075 A|B? 整除问题
#include #include using namespace std;//#define yangyuanint main(){#ifdef yangyuan ifstream in("in.txt"); cin.rdbuf(in.rdbuf());#endif // yangyuan int n; cin >> n; while (n--) {原创 2017-12-19 21:12:23 · 186 阅读 · 0 评论 -
HDOJ 2090 算菜价
不要被题目描述的输入所迷惑,虽然有中文字符,但是这和求解并没有关系,所以不用考虑字符编码的问题直接从标准输入读出然后舍弃就好。然后就是注意题目要求的输出精度。#include #include #include #include using namespace std;//#define yangyuanint main(){#ifdef yangyuan ifstre原创 2017-12-19 21:16:00 · 238 阅读 · 0 评论 -
HDOJ 2004 成绩转换
/** * Created by YangYuan on 2017/12/8. */public class Problem2004{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNex原创 2017-12-17 11:06:05 · 146 阅读 · 0 评论 -
HDOJ 2006 求奇数的乘积
/** * Created by YangYuan on 2017/12/8. */public class Problem2006{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNex原创 2017-12-17 11:07:20 · 184 阅读 · 0 评论 -
HDOJ 2007 平方和与立方和
/** * Created by YangYuan on 2017/12/8. */public class Problem2007{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int m, n; whi原创 2017-12-17 11:08:31 · 157 阅读 · 0 评论 -
HDOJ 2008 数值统计
根据输入的数据,统计负数、零、正数的数量。package introduction;import java.util.Scanner;/** * Created by YangYuan on 2017/12/8. */public class Problem2008{ public static void main(String[] args) {原创 2017-12-17 11:10:55 · 181 阅读 · 0 评论 -
HDOJ 2009 求数列的和
根据数列的定义,求前m项的和,注意输出精度。package introduction;import java.text.DecimalFormat;import java.util.Scanner;/** * Created by YangYuan on 2017/12/8. */public class Problem2009{ public static vo原创 2017-12-17 11:12:58 · 155 阅读 · 0 评论 -
HDOJ 2010 水仙花数
根据水仙花数的定义,求解就好。package introduction;import java.util.Scanner;/** * Created by yangyuan on 2017/12/8. */public class Problem2010{ public static void main(String[] args) { Sc原创 2017-12-17 11:15:53 · 289 阅读 · 0 评论