摘要:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1328题目认真分析一下不难,理论结合特例就知道了什么关系.我想到了运动的分解与合成,行走的总距离LSum就等于水平方向总距离LH和垂直方向LV距离的合成,即LSum*LSum=LV*LV*LH*LH.LV,LH分析一下即可得.学到了:1.弧度和角度的转换⊙﹏⊙b汗.http://blog.sina.com.cn/s/blog_7ff0f30f01011hkf.html2.函数 as 阅读全文
摘要:
uva oj 上的一题. 113 - Power of Cryptography就是给个 n 1#include int main(void){ int n; double p; while (scanf("%d %lf",&n,&p)!=EOF) { printf("%d\n",(int)(pow(p,1.0/n)+0.5)); //加个0.5应该是四舍五入 } return 0;} 阅读全文