結果
問題 | No.138 化石のバージョン |
ユーザー | ゆうP |
提出日時 | 2024-04-06 19:37:58 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 488 bytes |
コンパイル時間 | 13,413 ms |
コンパイル使用メモリ | 228,616 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-10-01 04:01:10 |
合計ジャッジ時間 | 11,804 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 14 |
ソースコード
// No.138 化石のバージョン package main import ( "fmt" "strconv" "strings" ) func main() { var s1, s2 string fmt.Scan(&s1, &s2) x1 := strings.SplitN(s1, ".", 3) a0, _ := strconv.Atoi(x1[0]) b0, _ := strconv.Atoi(x1[1]) c0, _ := strconv.Atoi(x1[2]) x2 := strings.SplitN(s2, ".", 3) a1, _ := strconv.Atoi(x2[0]) b1, _ := strconv.Atoi(x2[1]) c1, _ := strconv.Atoi(x2[2]) if a1 <= a0 && b1 <= b0 && c1 <= c0 { fmt.Println("YES") } else { fmt.Println("NO") } }