結果
| 問題 |
No.2853 A + B Problem
|
| コンテスト | |
| ユーザー |
naut3
|
| 提出日時 | 2024-08-25 13:52:51 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 615 bytes |
| コンパイル時間 | 11,717 ms |
| コンパイル使用メモリ | 405,240 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-25 13:53:07 |
| 合計ジャッジ時間 | 12,515 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#![allow(non_snake_case, unused_must_use, unused_imports)]
use std::io::{self, prelude::*};
fn main() {
let (stdin, stdout) = (io::read_to_string(io::stdin()).unwrap(), io::stdout());
let (mut stdin, mut buffer) = (stdin.split_whitespace(), io::BufWriter::new(stdout.lock()));
macro_rules! input {
($t: ty, $n: expr) => {
(0..$n).map(|_| input!($t)).collect::<Vec<_>>()
};
($t: ty) => {
stdin.next().unwrap().parse::<$t>().unwrap()
};
}
let N = input!(u64);
let ans = (1 << N.count_ones()) - 2u64;
writeln!(buffer, "{}", ans);
}
naut3