結果

問題 No.83 最大マッチング
ユーザー tsukacchantsukacchan
提出日時 2016-03-28 15:17:09
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 04:47:18
合計ジャッジ時間 854 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 0 ms
6,940 KB
testcase_03 WA -
testcase_04 AC 1 ms
6,940 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
6,944 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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