P2 : Heshen's Account Book Time Limit:1000ms Case Time Limit:1000ms Memory Limit:512MB Description Heshen was an official of the Qing dynasty. He made a fortune which could be comparable to a whole country's wealth by corruption. So he was known as t
python学习1-字符串数字基本运算以及if条件和while循环 字符串表达形式共四种: name = "string" name = 'string' name = """string""" name = '''string''' 数字基本运算方式: a = 39 b = 4 c = a + b c = a - b c = a*b c= a**b #次幂 c = a/b c = a%b #取余数 c = a//b #取除数
113-字符串替换 内存限制:64MB 时间限制:3000ms 特判: No通过数:171 提交数:388 难度:2 题目描述: 编写一个程序实现将字符串中的所有"you"替换成"we" 输入描述: 输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束 输出描述: 对于输入的每一行,输出替换后的字符串 样例输入: 复制 you are what you do 样例输出: we are what we do 用find()找you的位置,然后用
JavaScript--字符串常用方法总结 举例模板: var str = "what are you " var str1 = "sss" var txt = str.方法(参数1,参数2...) console.log(txt) 1.charAt(索引):根据索引,返回字符串中指定的字符串 var txt = str.charAt(5) 2.charCodeAt(索引):根据索引,返回字符串中指定字符串的ASCII编码 var txt = str.charCod
113-字符串替换 内存限制:64MB 时间限制:3000ms 特判: No 通过数:31 提交数:71 难度:2 题目描述: 编写一个程序实现将字符串中的所有"you"替换成"we" 输入描述: 输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束 输出描述: 对于输入的每一行,输出替换后的字符串 样例输入: 复制 you are what you do 样例输出: we are what we do python AC: try: wh