結果
| 問題 |
No.687 E869120 and Constructing Array 1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-31 21:50:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 295 bytes |
| コンパイル時間 | 515 ms |
| コンパイル使用メモリ | 22,144 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 08:40:39 |
| 合計ジャッジ時間 | 1,136 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| 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();
}