题解列表
二维数组,第一列为数字的绝对值,第二列为正负的标志,-1为负,1为正,最后输出时,每行两个数字相乘即可
摘要:解题思路:注意事项:参考代码:import java.util.*;
public class Main {
public static void main(String[] args……
编写题解 2804: 与指定数字相同的数的个数
摘要:解题思路:利用list.count()注意事项:参考代码:N,m=map(int,input().split())list1=list(map(int,input().split()))print(l……
编写题解 2799: 奥运奖牌计数
摘要:解题思路:注意事项:参考代码:n=int(input())jins=yins=tongs=0for i in range(n): list1=list(map(int,input().split……
编写题解 2942: 机器翻译(Queue)
摘要:解题思路:注意事项:参考代码:package temp;
import java.util.*;
public class t_2942 {
public static void main(S……
编写题解 2796: 求整数的和与均值
摘要:解题思路:注意事项:可能存在一行输入多个数的情况参考代码:list1 = list(map(int,input().split()))n=list1[0]list1.pop(0)while len(l……
机器翻译(数组解决)
摘要:解题思路:创建一个大小为m的数组,count为查词典的次数,mc是当内存没有该单词时,将该单词添加到内存中的位置。cha每次循环初始为true,当内存中有该单词时变为false,不会记录。没有该单词时……