結果

問題 No.83 最大マッチング
ユーザー latte0119
提出日時 2015-04-30 21:21:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 1,288 ms
コンパイル使用メモリ 158,068 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 17:14:45
合計ジャッジ時間 1,551 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d",&N);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    scanf("%d",&N);
    if(N&1){
        for(int i=0;i<(N-3)/2;i++)printf("1");
        printf("7\n");
    }
    else{
        for(int i=0;i<N/2;i++)printf("1");
        puts("");
    }

    return 0;
}
0