結果

問題 No.83 最大マッチング
ユーザー tsukacchan
提出日時 2016-03-28 15:29:02
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-02 06:17:21
合計ジャッジ時間 718 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 | scanf("%d",&N);
      | ^~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int main(void){

int i;
int N;
int amari=0,shou=0;

scanf("%d",&N);

amari=N%4;
shou=N/4;

if(N==2)
printf("1");

else if(N==3)
printf("7");

else if(amari==3){
for(i=0;i<shou;i++)
printf("11");
printf("7");
}

else if(amari==2){
for(i=0;i<shou;i++)
printf("11");
printf("1");
}

else if(amari==1){
for(i=0;i<shou;i++)
printf("11");
}

else if(amari==0){
for(i=0;i<shou;i++)
printf("11");
}

return 0;

}
0