提出 #28379581
ソースコード 拡げる
#ifndef LOCAL
#include <bits/stdc++.h>
using namespace std;
#define debug(...) 42
#else
#include "Debug.hpp"
#endif
class Task {
public:
void Perform() {
Read();
Solve();
}
private:
int x;
void Read() {
cin >> x;
}
void Solve() {
cout << F(F(F(x) + x) + F(F(x))) << '\n';
}
int64_t F(int64_t t) {
return t * t + 2 * t + 3;
}
};
int main() {
ios_base::sync_with_stdio(false), cin.tie(nullptr);
Task t;
t.Perform();
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Weird Function |
| ユーザ | tauhrick |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 100 |
| コード長 | 520 Byte |
| 結果 | AC |
| 実行時間 | 5 ms |
| メモリ | 3660 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | sample_01.txt, sample_02.txt, sample_03.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| sample_01.txt | AC | 5 ms | 3532 KiB |
| sample_02.txt | AC | 2 ms | 3520 KiB |
| sample_03.txt | AC | 2 ms | 3616 KiB |
| test_00.txt | AC | 3 ms | 3544 KiB |
| test_01.txt | AC | 3 ms | 3588 KiB |
| test_02.txt | AC | 2 ms | 3488 KiB |
| test_03.txt | AC | 2 ms | 3544 KiB |
| test_04.txt | AC | 2 ms | 3536 KiB |
| test_05.txt | AC | 2 ms | 3656 KiB |
| test_06.txt | AC | 2 ms | 3544 KiB |
| test_07.txt | AC | 2 ms | 3660 KiB |
| test_08.txt | AC | 3 ms | 3544 KiB |
| test_09.txt | AC | 2 ms | 3584 KiB |
| test_10.txt | AC | 3 ms | 3524 KiB |