CodeForces 577A Multiplication Table 质因子数
题目:click here
题意:看hint就懂了
分析:数论小题,在n0.5时间里求n的质因子数
#include <bits/stdc++.h> using namespace std;
typedef long long ll; int n, x;
ll ans; void solve() {
ans = ;
for( int i=; i*i<=x; i++ ) {
if( i <= n ) {
if( x%i == && x/i <= n ) {
if( i == x/i ) ans += ;
else ans += ;
}
}
else break;
}
printf("%I64d\n", ans );
} int main() {
while( ~scanf("%d%d", &n, &x ) ) {
solve();
} return ;
}
CodeForces 577A Multiplication Table 质因子数的更多相关文章
- Codeforces 577A - Multiplication Table
Let's consider a table consisting of n rows and n columns. The cell located at the intersection of i ...
- codeforces D. Multiplication Table
http://codeforces.com/contest/448/problem/D 题意:一个n×m的矩阵,a[i][j]=i*j; 然后把a数组排序,找出第k个数. 思路:1-n×m二分枚举,然 ...
- Codeforces 1220B. Multiplication Table
传送门 冷静分析容易发现,我们只要能确定一个数的值,所有值也就可以确定了 确定一个数的值很容易,$a_ia_j=M_{i,j},a_ia_k=M_{i,k},a_ja_k=M_{j,k}$ 然后就可以 ...
- Codeforces Codeforces Round #319 (Div. 2) A. Multiplication Table 水题
A. Multiplication Table Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/57 ...
- Codeforces Round #256 (Div. 2) D. Multiplication Table(二进制搜索)
转载请注明出处:viewmode=contents" target="_blank">http://blog.csdn.net/u012860063?viewmod ...
- Codeforces Round #586 (Div. 1 + Div. 2) B. Multiplication Table
链接: https://codeforces.com/contest/1220/problem/B 题意: Sasha grew up and went to first grade. To cele ...
- Codeforces Round #256 (Div. 2) D. Multiplication Table 二分法
D. Multiplication Table time limit per test 1 second memory limit per test 256 megabytes input st ...
- Codeforces 448 D. Multiplication Table
二分法判断答案 D. Multiplication Table time limit per test 1 second memory limit per test 256 megabytes inp ...
- Codeforces 448 D. Multiplication Table 二分
题目链接:D. Multiplication Table 题意: 给出N×M的乘法矩阵要你求在这个惩罚矩阵中第k个小的元素(1 ≤ n, m ≤ 5·10^5; 1 ≤ k ≤ n·m). 题解: n ...
随机推荐
- [Leetcode][Python]26: Remove Duplicates from Sorted Array
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com' 26: Remove Duplicates from Sorted Array ...
- 弹飞DZY(思维,打表,还没过全,先放着)
弹飞DZYDescription某天,机智的ZZC发明了一种超级弹力装置,为了在他的朋友DZY面前显摆,他邀请DZY一起玩个游戏.游戏一开始,ZZC在地上沿着一条直线摆上n个装置,每个装置设定初始弹力 ...
- cocos2d-x 3.0rc2 对于每个包执行情况的重要平台 (超级方便)
首先,你需要下载三个文件:每间 android-ndk android-sdk ant 下载位置可以随意:由于3.0rc2执行setup.py 自己主动搜索这三个文件 win32cmd以下: (1) ...
- 基于注解的EF
首先得你的ef dll版本在4.1以上 第一步贴第一个类 由于字段太多就写一部分 [Table("NavF")]//设置表名称 public class NavF ...
- Jar包下载地址
Download Apache log4j 1.2.17下载: http://logging.apache.org/log4j/1.2/download.html jsoup http://jsoup ...
- activity的打开关闭动画
Activity的打开关闭或者说相互跳转之间可以设置动画的.默认的打开关闭直接消失或出现,比较不优美,但是有的手机Rom对这个默认做了修改,比如红米HM1,默认的就是新页面自右向左滑动出现,自左向右滑 ...
- C++_知识点_指针类型转换
#include <iostream> using namespace std; int main(){ ] = {, , , , , , , , , }; int* p = (int*) ...
- BZOJ 2300: [HAOI2011]防线修建( 动态凸包 )
离线然后倒着做就变成了支持加点的动态凸包...用平衡树维护上凸壳...时间复杂度O(NlogN) --------------------------------------------------- ...
- Java基础知识总结(二)
&和&&的区别: 按位与:a&b是把a和b都转换成二进制数后逐位进行与的运算.若两数字的某位都为1,则该位的运算结果才为1.运算的最终结果是数字. 逻辑与:a& ...
- Android 实现GIF播放(解码)
实现原理很简单,先把GIF动画解码成多张Bitmap图片,然后放到AnimationDrawable里面去逐一播放即可. GifHelper代码: package com.android.view; ...