蓝桥杯
文章平均质量分 58
奶味蓝呀
这个作者很懒,什么都没留下…
展开
-
第十三届蓝桥杯省赛 JAVA B组(真题解析+个人体会)(已更新完G题)
试题 A: 星期计算【填空题】题目:答案:7解析:这题可以直接用double来做,考的时候我还在想会不会爆精度,后来发现答案也是对的。此题直接对7求余即可。public class Main { public static void main(String[] args) { double res = Math.pow(20, 22); res %= 7; System.out.println(res + 6);原创 2022-05-01 21:14:41 · 20411 阅读 · 25 评论 -
蓝桥杯试题 算法提高 单词出现次数(java)
这里我们用String类的substing方法和indexof方法实现public static int find(String s,String t){ int count=0; while (s.length()>0){ int i = s.indexOf(t); if (i!=-1) {//找不到 t会返回-1 结束程序 count++; }else { break; ..原创 2022-02-16 14:45:24 · 7702 阅读 · 0 评论