北大ACM1001的题目,怎么提交都是wrong answer,帮我看看
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/22 06:47:55
北大ACM1001的题目,怎么提交都是wrong answer,帮我看看
这是代码:
#include
#include
#include
float R;
int n;
int console[127];
void PRINT(int console[],int n){
int m=126;
int dot=m-n+1;
int j=0;
while(console[m]==0&&m>=dot)
console[m--]='\0';
while(console[j]==0&&j!=dot)
j++;
for(;j
这是代码:
#include
#include
#include
float R;
int n;
int console[127];
void PRINT(int console[],int n){
int m=126;
int dot=m-n+1;
int j=0;
while(console[m]==0&&m>=dot)
console[m--]='\0';
while(console[j]==0&&j!=dot)
j++;
for(;j
推荐高精度的用java做!
AC的代码自己好好看看吧,不要只抄代码
import java.io.*;
import java.math.*;
import java.util.Scanner ;
public class Main {
public static void main(String [] args ){
//Scanner sc = new Scanner( new FileInputStream("c:\\in.txt") ) ;
Scanner sc = new Scanner(System.in) ;
int n ;
BigDecimal b ;
while (sc.hasNext()){
b = sc.nextBigDecimal() ;
n = sc.nextInt() ;
b = b.pow(n).stripTrailingZeros() ;
String s = b.toPlainString() ;
if (s.charAt(0) == '0')
System.out.println(s.substring(1)) ;
else
System.out.println(s) ;
}
}
}
AC的代码自己好好看看吧,不要只抄代码
import java.io.*;
import java.math.*;
import java.util.Scanner ;
public class Main {
public static void main(String [] args ){
//Scanner sc = new Scanner( new FileInputStream("c:\\in.txt") ) ;
Scanner sc = new Scanner(System.in) ;
int n ;
BigDecimal b ;
while (sc.hasNext()){
b = sc.nextBigDecimal() ;
n = sc.nextInt() ;
b = b.pow(n).stripTrailingZeros() ;
String s = b.toPlainString() ;
if (s.charAt(0) == '0')
System.out.println(s.substring(1)) ;
else
System.out.println(s) ;
}
}
}
北大ACM1001的题目,怎么提交都是wrong answer,帮我看看
北大ACM第1006,我用C语言写的,调试时都是成功的为什么提交时出现Wrong Answer;请各位C语言大虾们看看
POJ 1001 wrong answer ,我试了下题目上面给的例子,答案全部一样,可是提交时总是Wrong answ
一道简单的ACM题目,快速排序的,老是提交不成功,大家帮我看看
ACM大神帮我看下哪里出问题了,提交后老是显示Wrong Answer at Test 1
C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了
帮我看看这两道题目怎么写
北大ACM1001 exponentiation 用C语言怎么写呢?对高精度数应该怎么处理?
但是我写的就是wrong answer.
请帮我看看标点符号应该怎么改?以下几句都是错误的标点符号.
谁帮我看看这些题目怎么写啊
帮我看看这几道英语题目怎么写