結果

問題 No.2138 Add Bacon
コンテスト
ユーザー kou_kkk
提出日時 2023-10-19 01:21:52
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 204 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,416 ms
コンパイル使用メモリ 67,728 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-06 22:31:10
合計ジャッジ時間 6,057 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import strscans

let
  (_, a, b, c, d, e) = stdin.readAll.scanTuple"$i $i $i $i $i"
var
  pt, cal: int
  ans = a - b

for x in 0..c:
  pt = a + x * d
  cal = b + x * e
  ans = max(ans, pt - cal)

echo ans
0