結果
問題 |
No.1010 折って重ねて
|
ユーザー |
|
提出日時 | 2020-03-20 21:37:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 1,340 ms |
コンパイル使用メモリ | 166,104 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 04:42:21 |
合計ジャッジ時間 | 2,391 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) int main(){ double x, y, z; cin >> x >> y >> z; z /= 1000; ll ans = 0; while(x > z || y > z){ if(x <= z){ y /= 2; }else if(y <= z){ x /= 2; }else if(x < y){ x /= 2; }else{ y /= 2; } z *= 2; ans++; } cout << ans << endl; return 0; }