結果
問題 |
No.687 E869120 and Constructing Array 1
|
ユーザー |
|
提出日時 | 2018-05-31 21:50:09 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 08:41:00 |
合計ジャッジ時間 | 824 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘void input()’: main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d", &N); | ~~~~~^~~~~~~~~~
ソースコード
#include <cstdio> using namespace std; auto N=0; void input(){ scanf("%d", &N); } void solve(){ for(auto i=1; i<10;i++){ auto j = N - i; if(j>=1&&j<=10){ printf("%d %d\n",i,j); break; } } } int main(){ input(); solve(); }