結果

問題 No.1033 乱数サイ
ユーザー MaboyMaboy
提出日時 2021-06-19 19:28:32
言語 Swift
(5.10.0)
結果
TLE  
実行時間 -
コード長 194 bytes
コンパイル時間 1,737 ms
コンパイル使用メモリ 127,172 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-05 01:10:57
合計ジャッジ時間 8,509 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,292 KB
testcase_01 AC 3 ms
8,160 KB
testcase_02 AC 3 ms
8,180 KB
testcase_03 AC 3 ms
8,208 KB
testcase_04 AC 3 ms
8,216 KB
testcase_05 AC 3 ms
8,180 KB
testcase_06 AC 4 ms
8,164 KB
testcase_07 AC 3 ms
8,172 KB
testcase_08 AC 3 ms
8,176 KB
testcase_09 AC 3 ms
8,280 KB
testcase_10 AC 3 ms
8,244 KB
testcase_11 AC 5 ms
8,232 KB
testcase_12 AC 50 ms
8,156 KB
testcase_13 AC 126 ms
8,212 KB
testcase_14 AC 1,647 ms
8,256 KB
testcase_15 TLE -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

let n = readLine()!.split(separator: " ").map{Int($0)!}
let d = (n[0] + 1) * n[1]
var a = 0.0
for i in 0...n[0]{
    for _ in 1...n[1]{
        a += 1.0 / Double(d) * Double(i)
    }
}
print(a)
0