結果
問題 |
No.589 Counting Even
|
ユーザー |
![]() |
提出日時 | 2017-11-03 23:12:13 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 671 ms |
コンパイル使用メモリ | 103,804 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 22:18:53 |
合計ジャッジ時間 | 1,381 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 23 |
ソースコード
import core.bitop; import std.algorithm; import std.array; import std.ascii; import std.container; import std.conv; import std.format; import std.math; import std.random; import std.range; import std.stdio; import std.string; import std.typecons; void main() { long n = readln.chomp.to!long; long two = 2; long cnt = 0; while (two <= n) { cnt += n / two; two <<= 1L; } if (n % 2 == 1) { --cnt; } cnt.writeln; }