結果
| 問題 |
No.642 Two Operations No.1
|
| コンテスト | |
| ユーザー |
ikd
|
| 提出日時 | 2018-02-03 12:28:53 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 415 bytes |
| コンパイル時間 | 604 ms |
| コンパイル使用メモリ | 98,844 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 23:47:22 |
| 合計ジャッジ時間 | 1,183 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
ソースコード
void main(){
import std.stdio, std.string, std.conv, std.algorithm;
long n; rd(n);
auto x=1L, c=0;
while(x<n) x*=2, c++;
writeln(c+(x-n));
}
void rd(T...)(ref T x){
import std.stdio, std.string, std.conv;
auto l=readln.split;
assert(l.length==x.length);
foreach(i, ref e; x){
e=l[i].to!(typeof(e));
}
}
void wr(T...)(T x){
import std.stdio;
foreach(e; x) write(e, " ");
writeln();
}
ikd