摘要:
Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating 阅读全文
摘要:
求最大公倍数 求最小公倍数 阅读全文
摘要:
Description 给定两个正整数,计算这两个数的最小公倍数。 Description 给定两个正整数,计算这两个数的最小公倍数。 给定两个正整数,计算这两个数的最小公倍数。 Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数. Input 输入包含多组测试数据,每组 阅读全文
摘要:
Description Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of th 阅读全文
摘要:
Description Fermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and 阅读全文
摘要:
Description People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others li 阅读全文
摘要:
Description soda has a set S with n integers {1,2,…,n}. A set is called key set if the sum of integers in the set is an even number. He wants to know 阅读全文
摘要:
快速幂求n^n; 快速幂求n^n后y位; 阅读全文
摘要:
Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个 阅读全文
摘要:
Description Famil Door wants to celebrate his birthday with his friends from Far Far Away. He has n friends and each of them can come to the party in 阅读全文