結果

問題 No.201 yukicoderじゃんけん
ユーザー yuki2006yuki2006
提出日時 2015-11-21 20:55:24
言語 Go
(1.22.1)
結果
AC  
実行時間 23 ms / 5,000 ms
コード長 544 bytes
コンパイル時間 12,654 ms
コンパイル使用メモリ 232,316 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 03:35:31
合計ジャッジ時間 12,970 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

package main

import (
	"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)
	if ans != nil {
		fmt.Println(ans.Name)
	}else {
		fmt.Println(-1)
	}
}
0