/*
2022年3月29日14点15分
输入年份、月份、日期,输出这一天是该年份下的第几天。
*/
#include <iostream>
using namespace std;
int run(int year)
{
if (year % 4 == 0 && year % 100 != 0) return true;
else if (year % 400 == 0) return true;
......................
阅读全部
|
StarLiver
贴于 2022年3月29日 14:16
hide
bbsi
'''
def descrip_city(city_name, coury_name):
#return(city_name + "is belong to "+ coury_name)
city_info = {"city":city_name, "country":coury_name}
return city_info
result = descrip_city(city_name='Reykjavik', coury_name='Iceland.')
print(result)
'''
def mname(*arg):
# TODO: write code...
for a in arg:
......................
阅读全部
|
感v
贴于 2022年3月29日 11:15
hide
bbsi
#include <stdio.h>
int gcd(int numa,int numb,int numc);
int i,j=1,k,d;
int a,b,c;
int main() {
scanf("%d %d %d",&a,&b,&c);
d=gcd(a,b,c);
return 0;
}
//最大公约数
int gcd(int numa,int numb,int numc){
int a=1;
......................
阅读全部
|
anlagreenya
贴于 2022年3月29日 00:02
hide
bbsi
#include <stdio.h>
/*int main(){
int a=10;
int c;
float b;
c=a/3.0;
b=((double)(3/2)+0.5+(int)1.99*2);
printf("%d\n",c);
printf("%1f",b);
// return 0;
}*/
......................
阅读全部
|
xutingting
贴于 2022年3月28日 23:22
hide
bbsi
age = int(input("Please input your age:\n"))
if age < 2:
print("原来你是个婴儿!!")
elif age < 4:
print("原来你是蹒跚学步,先等着过儿童节吧!!")
elif age < 20:
print("原来你是青少年,节日快乐!!")
elif age < 65:
print("原来你是成年人!!")
else:
print("原来你是老年人!!")
阅读全部
|
小呆阳
贴于 2022年3月28日 17:47
hide
bbsi
# 【程序1】
# 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
# 程序分析:python不用c语言那么麻烦,可以直接用内置的库函数得到结果
from itertools import permutations
perms = permutations([1,2,3,4], 3)
for perm in perms:
print(perm)
阅读全部
|
小呆阳
贴于 2022年3月28日 17:40
hide
bbsi
package xunhuan;
import java.util.*;
public class caishuzi {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("系统已随机生成一个整数,请你来猜");
//系统随机生成一个1到100的整数
int Number=(int)(Math.random()*100)+1;
int gnum=0;//猜的数
Scanner sc=new Scanner(System.in);//从键盘输入一个数
......................
阅读全部
|
马嘉祺
贴于 2022年3月26日 16:54
hide
bbsi
#include <stdio.h>
#include <iostream>
#include <math.h>
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}
float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
......................
阅读全部
|
czw2011
贴于 2022年3月26日 16:48
hide
bbsi
public class HelloWorld {
public static void main(String[] args) {
int a=1,b=3;
(a++)+(++b);
System.out.println("a++"+"++b");
阅读全部
|
马嘉祺
贴于 2022年3月26日 16:47
hide
bbsi
import turtle
t=turtle.Turtle()
t.penup()
t.goto(0,-50)
t.pendown()
t.begin_fill()
......................
阅读全部
|
xiaoyv2673
贴于 2022年3月23日 23:36
hide
bbsi