結果

問題 No.83 最大マッチング
ユーザー kidhrnkidhrn
提出日時 2020-03-20 01:32:50
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 425 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 28,268 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-08-20 21:19:32
合計ジャッジ時間 1,139 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 0 ms
4,384 KB
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 WA -
testcase_06 AC 1 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 0 ms
4,380 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int main(void){
    
    int N;
    scanf("%d",&N);
    
    int n;
    
    if(N>=4){
        if(N%2 == 0){
            n = N/2;
            for(int i=0;i<n;i++)printf("1");  }
        else{
            n = (N/2)-1;
            for(int i=0;i<n;i++)printf("1");
            printf("7");   } }
    else if(N==3)printf("7\n");
    else if(N==2)printf("1\n");
    
    printf("\n");
    
    return 0;
    
}
0