結果
問題 | No.998 Four Integers |
ユーザー |
|
提出日時 | 2024-03-30 15:31:54 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 11,353 ms |
コンパイル使用メモリ | 243,156 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-09-30 17:30:57 |
合計ジャッジ時間 | 11,685 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
// No.998 Four Integers package main import ( "fmt" "sort" ) func main() { var a, b, c, d int fmt.Scan(&a, &b, &c, &d) var l = []int{a, b, c, d} sort.Ints(l) if l[0]+1 == l[1] && l[1]+1 == l[2] && l[2]+1 == l[3] { fmt.Println("Yes") } else { fmt.Println("No") } }