結果
| 問題 |
No.395 永遠の17歳
|
| コンテスト | |
| ユーザー |
AQUA16573837
|
| 提出日時 | 2018-04-09 23:05:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 346 bytes |
| コンパイル時間 | 1,348 ms |
| コンパイル使用メモリ | 59,652 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 20:49:11 |
| 合計ジャッジ時間 | 1,612 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
コンパイルメッセージ
main.cpp: In function ‘void solve()’:
main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
22 | scanf("%d", &A);
| ~~~~~^~~~~~~~~~
ソースコード
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <deque>
#include <string>
#include <iostream>
using namespace std;
using ll = long long;
void solve();
int main() {
solve();
#ifdef DBG
while (true);
#endif
}
//395
void solve() {
int A;
scanf("%d", &A);
if (A < 15)
printf("%d\n", -1);
else
printf("%d\n", A - 7);
}
AQUA16573837