HDOJ 2521 反素数
来源:互联网 发布:淘宝网狗狗 编辑:程序博客网 时间:2024/05/22 14:10
HDACM 2521
import java.util.Scanner;public class Main{ public static void main(String[] args) { int num[] = new int[5001]; for (int i = 1; i < num.length; i++) { for (int j = i; j < num.length; j++) { if (j%i==0) { num[j]++; } } } Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n-- > 0) { int a = sc.nextInt(); int b = sc.nextInt(); int max = num[a]; int ans = a; for (int i = a+1; i <= b; i++) { if (num[i]>max) { max = num[i]; ans = i; } } System.out.println(ans); } sc.close(); }}
阅读全文
0 0
- hdoj 2521 反素数
- hdoj 2521 反素数
- hdoj-2521-反素数
- HDOJ 2521 反素数
- hdoj.2521 反素数 20140723
- hdoj 2521 反素数 【反素数??? 鉴定是坑题】
- HDOJ(HDU) 2521 反素数(因子个数~)
- hdoj 2521 反素数(水!和素数没半毛钱关系)
- hdoj 反素数 2521 (打表&暴力)
- HDOJ 2521 反素数
- HDOJ 4228 Flooring Tiles (反素数)
- hdoj StrangeStandard 4133 (反素数)
- 【素数】-HDU-2521-反素数
- HDU 2521 反素数
- HDU 2521 反素数
- 反素数 2521
- hdu 2521 反素数
- hdu-2521-反素数
- 机器学习之决策树算法
- PrimeNG ——Let Filtering, Sorting and Lazy loading work together!
- 字节全讲解
- Java web 入门
- No qualifying bean of type(xxxxxx)
- HDOJ 2521 反素数
- 线程池中多线程设置超时退出监控
- 用Python从新浪下载A股复权因子信息
- 剑指offer——斐波那契数列
- 今天第一次写
- maven的常用命令
- XMind 8 Update 6 Pro官方版下载附序列号
- 【git】pull、fetch 区别
- android lowmemorykiller笔记