結果

問題 No.83 最大マッチング
ユーザー hamray
提出日時 2017-11-23 12:22:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 1,956 ms
コンパイル使用メモリ 159,404 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-27 05:23:24
合計ジャッジ時間 1,979 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){  
    int N; cin >> N;
    string S = "";
    if(N % 2 == 0){
        while(true){
            if(N >= 1){
                S += "1"; N /= 2;
            }
            if(N / 2 <= 0) break;
        }
    }else{
        S += "7"; N /= 2;
        while(true){
            if(N >= 1){
                S += "1"; N /= 2;
            }
            if(N / 2 <= 0) break;
        }
    }
    cout << S << endl;
    return 0;
}
0