- 博客(10)
- 收藏
- 关注
原创 F - Domino Effect
Little Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play with the dominoes and make a "domino show"....
2018-03-27 13:21:16 324
原创 E - Soroban
You know that Japan is the country with almost the largest 'electronic devices per person' ratio. So you might be quite surprised to find out that the primary school in Japan teac...
2018-03-27 12:17:08 283
原创 D - Little Elephant and Problem
The Little Elephant has got a problem — somebody has been touching his sorted by non-decreasing array a of length n and possibly swapped some elements of the array. The Little Elephant doesn't want t...
2018-03-27 12:06:14 242
原创 C - Line to Cashier
Little Vasya went to the supermarket to get some groceries. He walked about the supermarket for a long time and got a basket full of products. Now he needs to choose the cashier t...
2018-03-27 11:59:41 320
原创 B - Xenia and Divisors
Xenia the mathematician has a sequence consisting of n (n is divisible by 3) positive integers, each of them is at most 7. She wants to split the sequence into groups of three so that for each group ...
2018-03-27 11:46:28 181
原创 A - Mr. Kitayuta's Gift
Mr. Kitayuta has kindly given you a string s consisting of lowercase English letters. You are asked to insert exactly one lowercase English letter into s to make it a palindrome. ...
2018-03-27 11:30:47 302
原创 D - 最小公倍数
给定两个正整数,计算这两个数的最小公倍数。 Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数. Output 对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。 Sample Input 10 14 Sample Out...
2018-03-26 14:46:50 162
原创 E - a/b + c/d
给你2个分数,求他们的和,并要求和为最简形式。 Input 输入首先包含一个正整数T(T<=1000),表示有T组测试数据,然后是T行数据,每行包含四个正整数a,b,c,d(0<a,b,c,d<1000),表示两个分数a/b 和 c/d。 Output 对于每组测试数据,输出两个整数e和f,表示a/...
2018-03-26 14:44:36 713
原创 F - Lowest Common Multiple Plus
求n个数的最小公倍数。 Input 输入包含多个测试实例,每个测试实例的开始是一个正整数n,然后是n个正整数。 Output 为每组测试数据输出它们的最小公倍数,每个测试实例的输出占一行。你可以假设最后的输出是一个32位的整数。 Sample Input 2 4 6 3 2 5 7 ...
2018-03-26 14:38:18 255
原创 G - 又见GCD
有三个正整数a,b,c(0<a,b,c<10^6),其中c不等于b。若a和c的最大公约数为b,现已知a和b,求满足条件的最小的c。 Input 第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。 Output 输出对应的c,每组测试数据占一行。 Samp...
2018-03-25 21:17:16 229
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人