zoukankan      html  css  js  c++  java
  • Java实现 洛谷 P1200 [USACO1.1]你的飞碟在这儿Your Ride Is He…

    在这里插入图片描述

    在这里插入图片描述

    import java.util.Scanner;
    
    public class Main{
        private static Scanner cin;
        
        public static void main(String args[])throws Exception {
            cin = new Scanner(System.in);
            String comet = cin.nextLine();
            long cometNum = calc(comet);
            String team = cin.nextLine();
            long teamNum = calc(team);
            if( cometNum == teamNum) {
                System.out.println("GO");
            }else {
                System.out.println("STAY");
            }
        }
        
        public static long calc(String temp) {
            long ret = 1;
            for(int i=0;i<temp.length();i++) {
                String charactor = String.valueOf(temp.charAt(i));
                int index = CHARACTER.valueOf(charactor).ordinal();
                ret *= index;
            }
            return ret%47;
        }
    }
    
    
  • 相关阅读:
    27.TreeMap
    26.HashCode
    25.HashTable
    myeclipse快捷键
    spring 配置
    jdbcType和javaType对应关系
    Ajax表单提交
    ajax
    JQuery及Form插件使用
    jsp标准数据库
  • 原文地址:https://www.cnblogs.com/a1439775520/p/12947104.html
Copyright © 2011-2022 走看看