結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2015-06-01 15:38:23 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 13:13:33 |
合計ジャッジ時間 | 601 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: 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 i, N; scanf("%d", &N); if(N == 2){ printf("1\n"); return 0; } if(N == 3){ printf("7\n"); return 0; } if(N % 2 == 1){ N -= 2; printf("7"); } for(i = 0;i < N / 2;i++){ printf("1"); } printf("\n"); return 0; }