結果

問題 No.201 yukicoderじゃんけん
ユーザー yuki2006yuki2006
提出日時 2015-11-21 20:54:14
言語 Go
(1.22.1)
結果
RE  
実行時間 -
コード長 917 bytes
コンパイル時間 12,095 ms
コンパイル使用メモリ 229,356 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-19 03:35:13
合計ジャッジ時間 13,084 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 RE -
testcase_03 AC 4 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 3 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 3 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 22 ms
5,376 KB
testcase_16 AC 21 ms
5,376 KB
testcase_17 AC 22 ms
5,376 KB
testcase_18 RE -
testcase_19 AC 22 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)
type Data struct {
	Name  string
	Point string
	X     string
}
func scan() *Data {
	c := Data{}
	fmt.Scanf("%s %s %s", &c.Name, &c.Point, &c.X)
	return &c
}
func (a *Data)sort(b *Data) *Data {
	if len(a.Point) < len(b.Point) {
		return b
	}
	if len(a.Point) > len(b.Point) {
		return a
	}

	if a.Point < b.Point {
		return b
	}
	if a.Point > b.Point {
		return a
	}
	return nil
}

func main() {
	A := scan()
	B := scan()
	ans := A.sort(B)
	fmt.Println(ans.Name)
}



var s = bufio.NewScanner(os.Stdin)

func next() string {
	s.Split(bufio.ScanWords)
	s.Scan()
	return s.Text()
}
func nextLine() string {
	s.Split(bufio.ScanLines)
	s.Scan()
	return s.Text()
}

func nextInt() int {
	i, e := strconv.Atoi(next())
	if e != nil {
		panic(e)
	}
	return i
}
func nextLong() int64 {
	i, e := strconv.ParseInt(next(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}
0