結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2022-11-18 23:53:34 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 11,563 ms |
コンパイル使用メモリ | 381,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-20 04:16:28 |
合計ジャッジ時間 | 12,459 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
use std::io::{self, BufRead};fn main() {let input = io::stdin().lock().lines().map(|l| {l.unwrap().split_whitespace().map(std::string::ToString::to_string).collect::<Vec<_>>()}).collect::<Vec<_>>();let l = input[0][0].parse::<i64>().unwrap();let k = input[0][1].parse::<i64>().unwrap();println!("{}", (l / (2 * k) + (l % (2 * k)).signum() - 1) * k);}