結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2017-03-03 18:00:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 6 ms / 5,000 ms |
コード長 | 264 bytes |
コンパイル時間 | 656 ms |
コンパイル使用メモリ | 55,212 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 05:11:16 |
合計ジャッジ時間 | 1,025 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &a); | ~~~~~^~~~~~~~~~
ソースコード
#include <iostream>using namespace std;int main() {int a;scanf("%d", &a);int b = a / 2; // floorif(a % 2 == 0){for(int i=0 ;i<b;i++)printf("%d",1);}else{printf("7");for(int i=0 ;i<b-1;i++){printf("%d",1);}}printf("\n");}