There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible by 3. Input Input contains N (1<=N<=231 - 1). Output Write answer to the output. Sampl…
链接: http://vj.acmclub.cn/contest/view.action?cid=168#problem/E 时限:250MS 内存:4096KB 64位IO格式:%I64d & %I64u 提交 状态 练习 SGU 105 问题描述 There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determ…
There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible by 3. Input Input contains N (1<=N<=231 - 1). Output Write answer to the output. Sampl…
C. Terse princess time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output «Next please», - the princess called and cast an estimating glance at the next groom. The princess intends to choose the mo…
A. Insomnia cure 哎 只能说英语太差,一眼题我看了三分钟. 题意:给5个数k, l, m, n 和 d,求1~d中能被k, l, m, n 至少一个整除的数的个数. 题解:…… 代码: #include <iostream> using namespace std; int main() { int a, b, c, d, n; cin >> a >> b >> c >> d >> n; ; ; i <= n;…
题目链接:http://www.codeforces.com/problemset/problem/148/A题意:求1到d中有多少个数能被k,l,m,n中的至少一个数整出.C++代码: #include <iostream> using namespace std; int k, l, m, n, d, ans; int main() { cin >> k >>l >> m >> n >> d; ; i <= d; i ++)…