結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2019-08-04 14:22:18 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 15,720 ms |
コンパイル使用メモリ | 222,228 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-08 06:12:40 |
合計ジャッジ時間 | 14,040 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
package mainimport ("bufio""fmt""os""strconv""strings")func main() {var sver, dver intsc := bufio.NewScanner(os.Stdin)sc.Scan()svers := strings.Split(sc.Text(), ".")sc.Scan()dvers := strings.Split(sc.Text(), ".")for i := 0; i < 3; i++ {sver, _ = strconv.Atoi(svers[i])dver, _ = strconv.Atoi(dvers[i])if dver < sver {fmt.Println("YES")os.Exit(0)} else if dver > sver {fmt.Println("NO")os.Exit(0)}}fmt.Println("YES")}