数字 |
4 |
5 |
6 |
7 |
8 |
9 |
0 |
1 |
2 |
3 |
天干 |
甲 |
乙 |
丙 |
丁 |
戊 |
己 |
庚 |
辛 |
壬 |
癸 |
数字 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
0 |
1 |
2 |
3 |
地支 |
子 |
丑 |
寅 |
卯 |
辰 |
巳 |
午 |
未 |
申 |
酉 |
戌 |
亥 |
year- int(input("请输入年份:")) s1="庚辛壬癸甲乙丙丁戊己 s2="申酉戍亥子丑寅卯辰巳午未" a=year%10 b=year%12 c=s1[a]+s2[b] print("天干地支为:",c) |
|year =int(inpu("请输入年份:")) s1="甲乙丙丁戊已庚辛壬癸" s2="子丑寅卯辰已午未申酉戌亥" a=year%10 b=year%12
print("天干地支为:",c) |
year-int(input("请输入年份:")
dic1= #天干字典
dic2= #地支字典
a=year%10
b=year%12
c=dic1[a]+dic2[b]
print("天干地支为:",2)