gravatar

.

zyy123 at 2021-11-13 00:57:16 UTC Comments(0)

好果汁,你让我疯狂!!

gravatar

T1072-虚假的答案:真实的答案

Joey20191113114 at 2020-02-08 10:01:58 UTC Comments(1)

虚假:(写了好久测试也没问题就是不AC的代码)

import java.util.Scanner;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
String decimal=in.nextLine();
BigInteger n=new BigInteger(decimal);
String hexStr=””;
BigInteger baseCode=new BigInteger(“16”);
BigInteger zero=new BigInteger(“0”);
while(!n.equals(zero)) {

--查看更多--
gravatar

T1263-简单模拟,原列用队列+存放堆用堆栈

rakiii at 2019-12-23 03:59:56 UTC Comments(0)

纯模拟
c++代码


  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int n,m,k,c;
  4. int main(){
  5. cin>>n>>m>>k;
  6. while(k--){
  7. int need=1;
  8. queue<int>q;
  9. stack<int>s;
  10. int x,y=0;
  11. for(int i=1;i<=n;i++){
  12. cin>>x;
  13. q.push(x);
  14. }
  15. while(1){
  16. if(!q.empty()){
  17. x=q.front();
  18. }
  19. if
--查看更多--
gravatar

T1000-2 3

20191113041 at 2019-11-20 04:34:24 UTC Comments(1)

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
int a, b;
while (cin.hasNext()){
a = cin.nextInt(); b = cin.nextInt();
System.out.println(a + b);
}
}
}

--查看更多--
gravatar

T1036-求大神解答,该怎么改,提交答案不对

17631298739 at 2019-01-15 08:37:46 UTC Comments(0)

include<stdio.h>

include<math.h>

int main()
{
// 1036:3.11给出一个月的总天数
//编写程序,提示用户输入月份和年份,然后显示这个月的天数。
//例如:如果用户输入的月份是2而年份是2000,那么程序应该显示“February 2000 has 29 days”(2000年2月有29天)。
//如果用户输入的月份为3而年份为2005,那么程序就应该显示“March 2005 has 31 days”(2005年3月有31天)。
//输入两个整数分别为月份m和年份y。 2 2000
//输出所输入年份和月份所对应的这个月的天数,格式应为 月份的英文 年份 has 天数 day。
//例如:“February 2000 has 29 days

--查看更多--
gravatar

T1047-正确答案,请拿走

20181113323 at 2018-12-28 12:40:09 UTC Comments(0)

import java.util.Scanner;

public class Main {

  1. public static void main(String[] args) {
  2. Scanner in = new Scanner(System.in);
  3. int n = in.nextInt();
  4. double tuition = 10000;
  5. for (int i = 0; i < n; i++) {
  6. tuition = tuition * (1 + 0.05);
  7. tuition = Math.ceil(tuition * 100) / 100;
  8. }
  9. double ntuition = tuition;
  10. double sum = 0;
  11. for (int i = 0; i < 4; i++) {
  12. sum +=
--查看更多--
gravatar

T1065-求助大佬,答案匹配但是wa

张鑫来蔡宇姣 at 2018-11-22 11:09:46 UTC Comments(5)

    1. include <stdio.h>

      include <math.h>

      void myprintf(double c,double b,double a,double d)//进行打印
      {
      if(((int)(a*1000))%10 == 0)//判断位数输出rate

      1. if(((int)(a*100))%10 != 0)
      2. printf("%.2f\t\t",a);
      3. else
      4. printf("%.1f\t\t",a);

      else

      1. printf("%.3f\t\t",a);

      if(((int)(c*100))%10)//判断位数输出月money

      1. printf("%.2f\t\t",c);
--查看更多--
gravatar

T1019-说好的提示用户输入数字

Maksim at 2018-10-15 11:01:04 UTC Comments(1)

<!—Markdown—>
> 编写程序,提示用户 输入体重(以磅为单位)以及身高(以英寸为单位),然后显示BMI。

我还以为要先输出
> 输入数字 weight in pounds
输入数字 height in inches

然后再输出答案

然后头铁的我就错了七遍
不看标准输入输出是这样的

--查看更多--
gravatar

T1010-关于单位meter的单复数问题

caiwolo at 2018-04-03 16:46:21 UTC Comments(0)

<!—Markdown—>
程序检验逻辑为:不大于1的均为单数(即meter),大于1的均为复数(即meters)。
(实际英语中应该是不等于1,均为复数形式吧)

gravatar

1030

20154835117 at 2018-03-13 13:00:18 UTC Comments(2)

include<stdio.h>

include<math.h>

int main(void)
{
float a,b,c,x,l,x1,x2,s;
int L,S;
scanf(“%f %f %f”,&a,&b,&c);
x=pow(b,2)-4ac;
x1=((-1)b+sqrt(x))/(2a);
x2=((-1)b-sqrt(x))/(2a);
l=x1-int(x1);
if(l==0)
L=0;
else
L=1;
s=x2-int(x2);
if(s==0)
S=0;
else
S=1;
if(x>0)
{
switch(L)
{
case 0:
printf(“The roots are %.f “,x1);
break;
case 1:

--查看更多--