User talk:I am islptng/Sandbox

From Esolang
Jump to navigation Jump to search

I'm sorry. Your talk page is in a mess. Unfortunately, I got hacked on LifeWiki. I asked ColorfulGalaxy if he could use his LifeWiki account. Unsurprisingly, he replied that he couldn't. I have to stay here for a month. You can feel free to help expand ColorfulGalaxy's Numbers page. ColorfulGalaxy's CA discoveries (talk) 10:25, 11 November 2024 (UTC)

Base-100

Inspired by Sclipting.

  〇一二三四五六七八九
〇〇一二三四五六七八九
一甲乙丙丁戊己庚辛壬癸
二子丑寅卯辰巳午未申酉
三戌亥零壹贰叁肆伍陆柒
四捌玖乾兑离震巽坎艮坤
五氢氦锂铍硼碳氮氧氟氖
六钠镁铝硅磷硫氯氩钾钙
七钪钛钒铬锰铁钴镍铜锌
八镓锗砷硒溴氪铷锶钇锆
九铌钼锝钌铑钯银镉铟锡

Re:
Base-256!

  0-  9 〇一二三四五六七八九
 10- 24 十百千万亿兆京垓秭穰沟涧正载极
 25- 31 横竖撇捺折钩提
 32- 39 甲乙丙丁戊己庚辛
 40- 49 零壹贰叁肆伍陆柒捌玖
 50- 51 壬癸
 52- 63 子丑寅卯辰巳午未申酉戌亥
 64- 75 鼠牛虎兔龙蛇马羊猴鸡狗猪
 76- 77 忐忑

78-137基于64卦,但有一些调整
乾坤屯蒙需讼师笔
履泰匹同有谦豫随
蛊临观噬贲剥复妄
颐坎离咸恒遁壮晋
夷家睽蹇解损益夬
姤萃升困井革鼎震
艮渐妹丰旅巽兑涣
节孚既未

138-255是元素周期表
氢氦
锂铍硼碳氮氧氟氖
钠镁铝硅磷硫氯氩
钾钙钪钛钒铬锰铁钴镍铜锌镓锗砷硒溴氪
铷锶钇锆铌钼锝钌铑钯银镉铟锡锑碲碘氙
铯钡镧铈镨钕钷钐铕钆铽镝钬铒铥镱镥铪钽钨铼锇铱铂金汞铊铅铋钋砹氡
钫镭锕钍镤铀镎钚镅锔锫锎锿镄钔锘铹𬬻𬭊𬭳𬭛𬭶鿏𫟼𬬭鿔鿭𫓧镆𫟷鿬鿫

Python translator from decimal to base-256:

td = '''
〇一二三四五六七八九
十百千万亿兆京垓秭穰沟涧正载极
横竖撇捺折钩提
甲乙丙丁戊己庚辛
零壹贰叁肆伍陆柒捌玖
壬癸
子丑寅卯辰巳午未申酉戌亥
鼠牛虎兔龙蛇马羊猴鸡狗猪
忐忑
乾坤屯蒙需讼师笔
履泰匹同有谦豫随
蛊临观噬贲剥复妄
颐坎离咸恒遁壮晋
夷家睽蹇解损益夬
姤萃升困井革鼎震
艮渐妹丰旅巽兑涣
节孚既未
氢氦
锂铍硼碳氮氧氟氖
钠镁铝硅磷硫氯氩
钾钙钪钛钒铬锰铁钴镍铜锌镓锗砷硒溴氪
铷锶钇锆铌钼锝钌铑钯银镉铟锡锑碲碘氙
铯钡镧铈镨钕钷钐铕钆铽镝钬铒铥镱镥铪钽钨铼锇铱铂金汞铊铅铋钋砹氡
钫镭锕钍镤铀镎钚镅锔锫锎锿镄钔锘铹𬬻𬭊𬭳𬭛𬭶鿏𫟼𬬭鿔鿭𫓧镆𫟷鿬鿫
'''.replace("\n","").replace("\r","")

def dec_to_b256(a):
	if a == 0: return "〇"
	res = ""
	neg = False
	if a < 0:
		a *= -1
		neg = True
	while a != 0:
		res = td[a % 256] + res
		a //= 256
	if neg: res = "负" + res
	return res

def b256_to_dec(a):
	neg = False
	if a[0] == "负":
		neg = True
		a = a[1:]
	res = 0
	for i in range(len(a)):
		res *= 256
		res += td.find(a[i])
	if neg: res *= -1
	return res

a = input()
try:
	a = int(a)
	print(dec_to_b256(a))
except:
	print(b256_to_dec(a))

_i__s__l__p__t__n__g_ 01:44, 6 January 2025 (UTC)