結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-30 13:15:34 |
| 言語 | Standard ML (MLton 20241230) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 643 bytes |
| 記録 | |
| コンパイル時間 | 4,699 ms |
| コンパイル使用メモリ | 704,772 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-30 13:15:44 |
| 合計ジャッジ時間 | 7,499 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
fun readInt () =
valOf (TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn)
val () =
let
val a = readInt ()
val b = readInt ()
fun findAns 0 0 acc = acc
| findAns x 0 acc = findAns (x - 1) 200 acc
| findAns x y acc =
(* floor x / (x + y) * 100 + 0.5 *)
if (x * 100 + ((x + y) div 2)) div (x + y) = a andalso
(y * 100 + ((x + y) div 2)) div (x + y) = b
then findAns x (y - 1) (Int.min (acc, x + y))
else findAns x (y - 1) acc
val ans = findAns 200 200 400
in
print (Int.toString ans ^ "\n")
end