結果

問題 No.863 計算量
ユーザー maimai
提出日時 2019-08-16 21:36:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 86 ms / 1,000 ms
コード長 175 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 16,068 KB
最終ジャッジ日時 2023-10-23 21:53:09
合計ジャッジ時間 2,585 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
16,068 KB
testcase_01 AC 81 ms
16,068 KB
testcase_02 AC 81 ms
16,068 KB
testcase_03 AC 84 ms
16,068 KB
testcase_04 AC 82 ms
16,068 KB
testcase_05 AC 82 ms
16,068 KB
testcase_06 AC 82 ms
16,068 KB
testcase_07 AC 80 ms
16,068 KB
testcase_08 AC 81 ms
16,068 KB
testcase_09 AC 81 ms
16,064 KB
testcase_10 AC 82 ms
16,068 KB
testcase_11 AC 81 ms
16,068 KB
testcase_12 AC 80 ms
16,068 KB
testcase_13 AC 81 ms
16,068 KB
testcase_14 AC 81 ms
16,068 KB
testcase_15 AC 82 ms
16,068 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def lscan; gets.split.map(&:to_i); end

a, b = [gets,gets].map(&:to_f)

N = 5000
M = 200000
N2 = N*N
M2 = M*M

d1 = ( a/N*M - b).abs
d2 = ( a/N2*M2 - b).abs

p d1 < d2 ? 1 : 2
0