結果
| 問題 |
No.1934 Four Fruits
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-05 20:49:29 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 419 bytes |
| コンパイル時間 | 13,214 ms |
| コンパイル使用メモリ | 238,456 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 21:57:13 |
| 合計ジャッジ時間 | 12,935 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
// No.1934 Four Fruits
package main
import "fmt"
func main() {
var a, b, c int
fmt.Scan(&a, &b, &c)
if a == b && b == c {
// すべて同じ種類
fmt.Println(a)
} else if a != b && b != c && c != a {
// すべて異なる種類
fmt.Println(6 - a - b - c)
} else {
// 2種類の2つずつ
if b == c {
fmt.Println(a)
} else if a == c {
fmt.Println(b)
} else {
fmt.Println(c)
}
}
}