結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2015-08-31 09:52:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 416 bytes |
コンパイル時間 | 812 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 16:44:23 |
合計ジャッジ時間 | 1,312 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d", &N); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ int N; scanf("%d", &N); if(N%2==1 && N>2){ N -= 3; printf("7"); } while(N>=6){ N -= 2; printf("1"); } if(N==5){ printf("71\n"); }else if(N==4){ printf("11\n"); }else if(N==3){ printf("7\n"); }else if(N==2){ printf("1\n"); }else{ printf("\n"); } return 0; }