1815: easy problem Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 98  Solved: 48 SubmitStatusWeb Board Description 给你一个数字N,N的范围是1~1000000,求一个最小的正整数M,这个数字M的各个位的数字加上它本身之和恰好为N.当然,如果没有解,输出0. Input 输入数据由多组数据组成,每行由一个数字N组成(1<=N<=1000000). Output 对于每组数据,输出…
1815: easy problem Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 243  Solved: 108 SubmitStatusWeb Board Description 给你一个数字N,N的范围是1~1000000,求一个最小的正整数M,这个数字M的各个位的数字加上它本身之和恰好为N.当然,如果没有解,输出0. Input 输入数据由多组数据组成,每行由一个数字N组成(1<=N<=1000000). Output 对于每组数据,…
A. Strange Addition time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Unfortunately, Vasya can only sum pairs of integers (a, b), such that for any decimal place at least one number has digi…
http://acm.hdu.edu.cn/showproblem.php?pid=5475 An easy problem Time Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 755 Accepted Submission(s): 431 Problem Description One day, a useless calculator was…
An Easy Problem for Elfness Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1148    Accepted Submission(s): 234 Problem Description Pfctgeorge is totally a tall rich and handsome guy. He plans t…
An Easy Problem   Description As we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and its binary form. Given a positive integer I, you task is to find out an integer J, which is the m…
[HDU4729]An Easy Problem for Elfness 题目大意: 给你一棵\(n(n\le10^5)\)个点的树,树上每条边都有容量. \(m(m\le10^5)\)次询问,每次询问你有\(k\)的预算,可以花\(a\)的代价在任意两点间建一条流容量为\(1\)的边(包括重边),或者花费\(b\)的代价将某条边的容量加\(1\),问在不超过预算的情况下,从\(s\)到\(t\)的最大流量. 思路: 首先,考虑没有\(k,a,b\)的情况,答案就是\(s,t\)路径上的权值最小…
E.Easy Problem Description: Zghh likes number, but he doesn't like writing problem description. So he will just give you a problem instead of telling a long story for it. Now given a positive integer x and k digits a1,a2,...,ak, can you find a positi…
An easy problem C Time Limit: 4000/2000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Problem Description N个数排成一列,有三种操作.1.给一段区间内的每个数乘上一个非负整数.2.给一段区间内的每个数加上一个非负整数.3.询问一段区间的和模上P的值. Input 第一行两个整数N(1≤N≤100000)表示数的个数,P(1≤P≤1000000000)表示模的值.接下来…
题目链接:POJ 1152 An Easy Problem! 题意:求一个N进制的数R.保证R能被(N-1)整除时最小的N. 第一反应是暴力.N的大小0到62.发现当中将N进制话成10进制时,数据会溢出. 这里有个整除,即(N-1)取模为0. 样例:a1a2a3表示一个N进制的数R.化成10进制: (a1*N*N+a2*N+a3)%(N-1)==((a1*N*N)%(N-1)+(a2*N)%(N-1)+(a3)%(N-1))%(N-1)==(a1+a2+a3)%(N-1). 这样防止了数据的溢出…