結果

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

テストケース

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