num=int(input("请输入一个整数:"))
if num%2==0:
print("even")
else:
print("odd"
阅读全部
|
小呆阳
贴于 2022年4月18日 17:38
hide
bbsi
print("我在中国学Python\n")
# 练习一下循环的使用
for i in range(1, 21):
print(f"我爱编程中国 {i} 次")
阅读全部
|
joy張
贴于 2022年4月18日 11:26
hide
bbsi
#include <stdio.h>
// int main()
// {
// int a[5] = {1,2,3,4,5};
// int* ptr = (int*)(&a+1);
// printf("%d %d", *(a+1), *(ptr-1));
// return 0;
// }
//杨氏矩阵,o(n)的空间复杂度,找数字
// int find_num(int arr[3][3], int r, int c, int k)
......................
阅读全部
|
nn154189906
贴于 2022年4月17日 21:44
hide
bbsi
section .data ;section declaration
msg db "Hello, 编程中国",0xA ;our dear string
len equ $ - msg ;length of our dear string
section .text ;section declaration
;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as their
;entry point. Use ld -e foo to override the default.
_start:
;write our string to stdout
mov eax,4 ;system call number (sys_write)
mov ebx,1 ;first argument: file handle (stdout)
mov ecx,msg ;second argument: pointer to message to write
......................
阅读全部
|
暗夜之狼
贴于 2022年4月17日 13:23
hide
bbsi
weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
m_day=[0,31,28,31,30,31,30,31,31,30,31,30,31]
n=int(input())
for i in range(n):
year,month,day=map(int,input().split())
days=0
if (year%400==0 or (year%4==0 and year%100!=0 )): #如果闰年2月为29天
m_day[2]=29
if month<1 or month>12 or day <1 :
print("Illegal")
elif day>m_day[month]:
......................
阅读全部
|
jywzf
贴于 2022年4月17日 09:31
hide
bbsi
weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
m_day=[0,31,28,31,30,31,30,31,31,30,31,30,31]
n=int(input())
for i in range(n):
year,month,day=map(int,input().split())
days=0
if (year%400==0 or (year%4==0 and year%100!=0 )): #如果闰年2月为29天
m_day[2]=29
if month<1 or month>12 or day <1 :
print("Illegal")
elif day>m_day[month]:
......................
阅读全部
|
jywzf
贴于 2022年4月16日 22:58
hide
bbsi
weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
def ymd(year,month,day):
m_day=[0,31,28,31,30,31,30,31,31,30,31,30,31]
days=0
year=abs(year)
for i in range(0,year):
if i%400==0 or (i%4==0 and i%100!=0 ):
days+=366
else:
days+=365
if (year%400==0 or (year%4==0 and year%100!=0 )):
m_day[2]=29
......................
阅读全部
|
jywzf
贴于 2022年4月16日 19:37
hide
bbsi
#include <stdio.h>
void Swap(char* buf1, char* buf2, int width)
{
int i = 0;
for (i = 0; i<width; i++)
{
char tmp = *buf1;
*buf1 = *buf2;
*buf2 = tmp;
buf1++;
buf2++;
......................
阅读全部
|
nn154189906
贴于 2022年4月16日 19:14
hide
bbsi