結果

問題 No.83 最大マッチング
ユーザー tsukacchan
提出日時 2016-03-28 15:17:09
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-02 06:16:49
合計ジャッジ時間 926 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
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\n");

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

else if(N==4)
printf("11\n");



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

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

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

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


return 0;

}
0