結果

問題 No.863 計算量
ユーザー 👑 maimai
提出日時 2019-08-16 21:36:35
言語 Ruby
(3.2.1 )
結果
AC  
実行時間 77 ms / 1,000 ms
コード長 175 bytes
コンパイル時間 29 ms
実行使用メモリ 13,968 KB
最終ジャッジ日時 2023-03-31 09:46:59
合計ジャッジ時間 2,419 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
13,936 KB
testcase_01 AC 76 ms
13,852 KB
testcase_02 AC 75 ms
13,900 KB
testcase_03 AC 74 ms
13,824 KB
testcase_04 AC 77 ms
13,964 KB
testcase_05 AC 72 ms
13,948 KB
testcase_06 AC 72 ms
13,900 KB
testcase_07 AC 72 ms
13,832 KB
testcase_08 AC 73 ms
13,968 KB
testcase_09 AC 73 ms
13,944 KB
testcase_10 AC 73 ms
13,836 KB
testcase_11 AC 72 ms
13,812 KB
testcase_12 AC 73 ms
13,840 KB
testcase_13 AC 73 ms
13,724 KB
testcase_14 AC 73 ms
13,728 KB
testcase_15 AC 74 ms
13,832 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