結果
| 問題 |
No.2555 Intriguing Triangle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-01 00:42:04 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 179 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-26 15:23:23 |
| 合計ジャッジ時間 | 3,626 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 WA * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
a = gets.to_i
b = gets.to_i
c = gets.to_i
g = b.gcd(c)
q = (b + c) / g
inf = (b - c).abs
lim = b + c
puts (1 .. 100).any? { |n| (inf + 1 .. lim - 1) === a + n * q } ? "Yes" : "No"