結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2016-02-07 20:40:17 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 21:34:04 |
合計ジャッジ時間 | 787 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &N); | ~~~~~^~~~~~~~~~
ソースコード
#include<stdio.h>//#include<math.h>int main(void) {int N, i;printf("Enter number N: ");scanf("%d", &N);if (N % 2 == 0) {for (i = 1; i <= N / 2; i++)printf("1");if (i == N / 2)printf("\n");}else {printf("7");for (i = 1; i <= (N - 3) / 2; i++)printf("1");if (i == N / 2)printf("\n");}return 0;}