#include<stdio.h>
#include<math.h>
int son[ ];
int main(){
int n,m;
while( scanf("%d%d",&n,&m)== ){
for( int i=;i<n;i++ )
scanf("%d",&son[i]);
int sum = ;
if( m%== ){
for( int i=;i<n;i++ ){
if( son[i]> ){
sum += (int)pow( 1.0*son[i],m );
}
}
}
else{
for( int i=;i<n;i++ ){
sum += (int)pow( 1.0*son[i],m );
}
}
printf("%d\n",sum);
}
return ;
}

没什么好说的。。

POJ2209+水题!的更多相关文章

  1. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  2. ACM :漫漫上学路 -DP -水题

    CSU 1772 漫漫上学路 Time Limit: 1000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit ...

  3. ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)

    1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[ ...

  4. [poj2247] Humble Numbers (DP水题)

    DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...

  5. gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,

    1195: 相信我这是水题 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 821  Solved: 219 Description GDUT中有个风云人 ...

  6. BZOJ 1303 CQOI2009 中位数图 水题

    1303: [CQOI2009]中位数图 Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 2340  Solved: 1464[Submit][Statu ...

  7. 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题

    B - 大还是小? Time Limit:5000MS     Memory Limit:65535KB     64bit IO Format: Description 输入两个实数,判断第一个数大 ...

  8. ACM水题

    ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...

  9. CF451C Predict Outcome of the Game 水题

    Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...

随机推荐

  1. 类似微博菜单 ,用swift语言编写

    自定义tabar搭载界面1.-自定义标题按钮_如图  2.10-导航条按钮封装 演示如下 源代码下载DSWeibo.zip

  2. dedecms获取栏目下的频道列表

    可以使用: {dede:channelartlist}标签  使用方法: {dede:channelartlist row='6'} <dl>  <dt><a href= ...

  3. git命令(流程)

    1,配置你的信息: git config --global user.name 你的名字 git config --global user.email 你的邮箱 --global 表示所有git仓库都 ...

  4. spark处理jsonFile

    按照spark的说法,这里的jsonFile是特殊的文件: Note that the file that is offered as jsonFile is not a typical JSON f ...

  5. ant+dbunit 导xml到mysql

    1.增加自己的data目录和xml数据文件 2.lib依赖 commons-logging-1.1.1.jar dbunit-2.4.8.jar junit-4.9b2.jar mysql-conne ...

  6. 【MINA】心跳机制

    列上两篇好文章 http://www.cnblogs.com/pricks/p/3832882.html http://blog.csdn.net/cruise_h/article/details/1 ...

  7. Apache中关于页面缓存的设置

    http://www.cnblogs.com/yyyyy5101/articles/1899350.html Expires.Cache-Control.Last-Modified.ETag是RFC ...

  8. 使用asp.net上传图片并且裁剪的方法

    工欲善其事,必先利其器,坚持才能更好 这篇文章主要是强调怎么使用asp.net上传图片并且能够裁剪,这个功能主要使用在注册信息的时候需要上传头像并且图片格式很大的时候能够把图片裁剪成更小的图片.下面来 ...

  9. C--指针函数,static

    (*p)是固定写法,代表指针的变量P将来是指向函数 void (*p)(); p=test;//指针变量P指向了test函数 函数名test代表函数地址 //同等调用test()函数 (*p)(); ...

  10. OC3_MyRect

    // // MyRect.h // OC3_MyRect // // Created by zhangxueming on 15/6/9. // Copyright (c) 2015年 zhangxu ...