Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won't move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other k…
Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won't move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other k…
这题简单,只要看懂题目就好,坑爹的是我的英语水平太差了,wa了n次,所以 仅此纪念 一下. //坑爹的英语题目,注意重点:move d times clockwise the current time #include<stdio.h> #include<string.h> int main() { ]; while(scanf("%d%d",&s,&d)!=EOF) { &&d==)break; e=s; ;i<;i++)…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5387 比较水的一道题目,也是自己单翘的第一道题目吧,题意就是找到给定时间时钟三个指针之间的夹角, 需要注意的问题分数的表示方法,辗转相除求最大公因子,同时除去, 此外还应注意夹角为锐角. #include<stdio.h> #include<cmath> #include<algorithm> using namespace std; int gcd(int a,int b…
Problem Description A有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" . 问B猜n次可以猜到的最大数. Input 第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30) Output 猜n次可以猜到的最大数 Sample Input 2 1 3 Sample Output 1 7 这个题目我总感觉题意没说明白,没办法.参考了一下网上的题意. 题意就是: 最多猜n次一定可以猜到1…
Problem Description Given an positive integer A (1 <= A <= 100), output the lowest bit of A. For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2. Another example goes like this:…
Weird Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3109    Accepted Submission(s): 1137 Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won't move unti…
题意很简单.就是求x^k-1的因式分解.显然x-1必然是其中之一(x=1, x^k-1=0).假设k=mp. 则x^k = (x^p)^m, 同理x^p-1必然是其中之一,即x^p的所有因式一定是x^k的所有因式.思路就是按照上面的方式,先找到k的约束的多项式,然后求得最后一个因式的系数.求得所有[2,1001]的因式后.对因式进行重新排序,并按照格式输出.输出时注意系数为1,阶数为0,阶数为1. /* 3205 */ #include <iostream> #include <stri…
摘要:一个由日本人设计的有意思的Flash时钟:人体时钟 hone hone clock .安装很简单,直接js导入即可,包括两种样式:透明背景和白色背景. 很可爱的一个设计,实现后效果如下: 使用方法: 将下面代码导入你需要加时钟的地方: 1.<script charset="Shift_JIS" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.js"&g…
题意很简单. 一次最多多切出一条边! 其余的就没什么好说的了 import java.util.*; import java.math.*; public class Main{ public static void main( String[] args ){ Scanner cin = new Scanner( System.in ); BigInteger n,m,p; while( cin.hasNext() ){ n = cin.nextBigInteger(); m = cin.ne…