結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2025-02-27 19:48:32 |
言語 | Nim (2.2.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 338 bytes |
コンパイル時間 | 4,427 ms |
コンパイル使用メモリ | 64,816 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2025-02-27 19:48:40 |
合計ジャッジ時間 | 8,300 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 27 |
ソースコード
import strscans func calc(x, y: int): (int, int) = let v1 = 100 * x / (x + y) v2 = 100 * y / (x + y) (v1.toInt, v2.toInt) var (_, a, b) = stdin.readLine.scanTuple "$i $i" x = 1 y = 0 if a < b: swap(a, b) while true: let (c, d) = calc(x, y) if (c, d) == (a, b): break if c < a: inc x else: inc y echo x + y