Submission #00085
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include <iomanip> #include <numeric> #include <assert.h> #define in std::cin #define out std::cout int32_t r; int main() { using std::endl; in.sync_with_stdio( false ); out.sync_with_stdio( false ); int count=0; in >> r; for (int32_t i = -r; i <= r; ++i) for (int32_t j = -r; j <= r; ++j) { if (i*i + j*j == r*r) { ++count; } } out << count << endl; return 0; } #endif |
ステータス
項目 | データ |
---|---|
問題 | 0001 - コンパス |
ユーザー名 | eiya |
投稿日時 | 2017-03-30 20:59:23 |
言語 | C++11 |
状態 | Accepted |
得点 | 5 |
ソースコード長 | 748 Byte |
最大実行時間 | 24 ms |
最大メモリ使用量 | 636 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 5 / 5 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
01.in | AC | 13 ms | 480 KB |
1
|
02.in | AC | 23 ms | 448 KB |
1
|
03.in | AC | 19 ms | 412 KB |
1
|
04.in | AC | 17 ms | 384 KB |
1
|
05.in | AC | 22 ms | 480 KB |
1
|
06.in | AC | 19 ms | 448 KB |
1
|
07.in | AC | 17 ms | 544 KB |
1
|
08.in | AC | 20 ms | 636 KB |
1
|
09.in | AC | 17 ms | 604 KB |
1
|
10.in | AC | 24 ms | 572 KB |
1
|