結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2015-04-30 21:22:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 1,228 ms |
コンパイル使用メモリ | 156,888 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 17:14:47 |
合計ジャッジ時間 | 1,788 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&N); | ~~~~~^~~~~~~~~
ソースコード
#include<bits/stdc++.h>using namespace std;int main(){int N;scanf("%d",&N);if(N&1){printf("7");for(int i=0;i<(N-3)/2;i++)printf("1");puts("");}else{for(int i=0;i<N/2;i++)printf("1");puts("");}return 0;}