杭电1008,我的代码总是WA,求救.本人初学.小鸟.#include using namespace std;void main(){int n,k,i,a,sum;while(cin>>n&&n!=0){k=0;for(i=1;i>a;if(k==0){sum=a*6+5;k=a;}if(a>k){sum+=6*(a-k)+5;k=a;}if(a

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 13:03:06
杭电1008,我的代码总是WA,求救.本人初学.小鸟.#include using namespace std;void main(){int n,k,i,a,sum;while(cin>>n&&n!=0){k=0;for(i=1;i>a;if(k==0){sum=a*6+5;k=a;}if(a>k){sum+=6*(a-k)+5;k=a;}if(a

杭电1008,我的代码总是WA,求救.本人初学.小鸟.#include using namespace std;void main(){int n,k,i,a,sum;while(cin>>n&&n!=0){k=0;for(i=1;i>a;if(k==0){sum=a*6+5;k=a;}if(a>k){sum+=6*(a-k)+5;k=a;}if(a
杭电1008,我的代码总是WA,求救.本人初学.小鸟.
#include
using namespace std;
void main()
{
int n,k,i,a,sum;
while(cin>>n&&n!=0)
{
k=0;
for(i=1;i>a;
if(k==0)
{
sum=a*6+5;
k=a;
}
if(a>k)
{
sum+=6*(a-k)+5;
k=a;
}
if(a

杭电1008,我的代码总是WA,求救.本人初学.小鸟.#include using namespace std;void main(){int n,k,i,a,sum;while(cin>>n&&n!=0){k=0;for(i=1;i>a;if(k==0){sum=a*6+5;k=a;}if(a>k){sum+=6*(a-k)+5;k=a;}if(a
其实就一个问题……把
if(num==0)
cout<<0<<endl;
下面的那行cout<<0<<endl;
变成 break;
就AC了……
问题在于,要求程序如果输入0,则不输出任何结果直接退出运行,而你的程序不是这么做的
不要满足于AC,看看别人的程序学学思路,争取用更简单的代码重新AC一次才有自己的收获

杭电1008,我的代码总是WA,求救.本人初学.小鸟.#include using namespace std;void main(){int n,k,i,a,sum;while(cin>>n&&n!=0){k=0;for(i=1;i>a;if(k==0){sum=a*6+5;k=a;}if(a>k){sum+=6*(a-k)+5;k=a;}if(a 关于PKU上的1007题,为什么总是WA按照题目给定的输入可以输出题目要求的,不过提交总是WA,请大牛们不吝赐教~我的代码如下:#include#include#includeusing namespace std; int main(){int i,j,z,n,m;int num1[100],nu 杭电 oj FatMouse' Trade原题连接:代码太长,不能发,考虑到了catfood 可能为0的情况,但是还是一直wa给个代码的连接吧,http://hi.baidu.com/%E6%88%91%E6%83%B3%E6%9C%89%E4%B8%AA%E4%BF%A1%E4%BB%B0/blog/item/6a609243435479208 杭电acm怎么查看自己ac过的代码 国际求救信号SOS的二进制代码是什么? 求救,求救,求救!我英语学的不好 “SOS”国际数字代码求救信号“SOS”的国际二进制数字代码 杭电ACM3637 求算法看起来是水题~但我写了2天的结果就是过了样例 提交WA 我是直接暴力递增分母 但目测一定不行! 高手来帮我把这道acm的水题的我的代码找下错试过很多组数据 也都是正确的 可是提交的时候就是显示WA了 我身上总是有电,和别人接触,还是和能导电的接触,总是电.这是怎么回事? 杭电1008总是WA?The highest building in our city has only one elevator.A request list is made up with N positive numbers.The numbers denote at which floors the elevator will stop,in specified order.It costs 6 seconds to move the elevator up one fl 洗衣服日记 急求救,求救!我要洗衣服的日记 hdu 1011那位大牛能帮我看看代码 为什么总是wa啊?感激不尽啊!#include #include #include #include using namespace std;long n,m;long a[101],b[101],l[101],r[101],f[101][101];long work(long,long);long work(long x,long y){long i,j;if ((x zoj 1205 老是WA,help我自己输入的数据都可以得出正确答案,但提交以后老是WA,谁能告诉我哪里错了代码如下//zoj 1205//2008 01 29#include#includeusing namespace std;int main(){int plus20(char a,char b,string::iterator su 为什么我总是被静电电到? 为什么我总是被静电电到? GRE大神.求救.我打算半年后考g,之前买不到红宝正序版,只是在背乱序版,因为实在太乱了,背到剩下几个list总是觉的似曾相识但又找不到在哪里,我想问我还要继续背下去吗?还是买本红宝(现在 wa饭的wa怎么写