結果
問題 | No.2624 Prediction by Average |
ユーザー |
![]() |
提出日時 | 2024-02-29 18:50:05 |
言語 | Julia (2.11.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 889 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 6,940 KB |
実行使用メモリ | 258,948 KB |
最終ジャッジ日時 | 2024-10-01 17:48:14 |
合計ジャッジ時間 | 3,899 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 4 |
ソースコード
function main()t = int(input())ns = [inputs() for _ = 1:t]for (n_, s_) = nsn = int(n_)seisu, syosu = int(split(s_, "."))if syosu == 0println(n)continueendbottom, up = floor(Int, 1000 / (syosu + 1)), floor(Int, 1000 / syosu)# println(bottom, " to ", up)println(n ÷ up * (up - bottom) + max(0, n - n ÷ up * up - bottom))endend# --------input func----------input() = readline()inputs() = split(readline())int(s::AbstractChar) = parse(Int, s)int(s::AbstractString) = parse(Int, s)int(v::AbstractArray) = map(x -> parse(Int, x), v)debug(x...) = println(stderr, x...)function _main()isequal(abspath(PROGRAM_FILE), @__FILE__) && return main()mystdin = joinpath(abspath(@__DIR__), "myinput.txt")redirect_stdio(stdin=mystdin) domain()endend_main()