Submission #00115
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include <bits/stdc++.h> #include<gmpxx.h> #define yes cout<<"Yes\n" #define no cout<<"No\n" #define lmax LONG_LONG_MAX #define lmin LONG_LONG_MIN #define imax INT_MAX #define imin INT_MIN #define ll long long using namespace std; int main(){ int n; cin>>n; int ans = 1; for ( int i = 3;i<= n;i+=2){ ans+=i; } cout<<ans<<endl; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0007 - 偶数嫌いのユタカくん |
ユーザー名 | gousuper(r2204) |
投稿日時 | 2024-04-26 16:09:59 |
言語 | C++17 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 393 Byte |
最大実行時間 | 45 ms |
最大メモリ使用量 | 508 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 45 ms | 476 KB |
1
|
in2.txt | AC | 35 ms | 452 KB |
1
|
in3.txt | AC | 18 ms | 424 KB |
1
|
in4.txt | AC | 17 ms | 400 KB |
1
|
in5.txt | AC | 18 ms | 364 KB |
1
|
in6.txt | AC | 20 ms | 464 KB |
1
|
insample1.txt | AC | 16 ms | 440 KB |
1
|
insample2.txt | AC | 17 ms | 412 KB |
1
|
insample3.txt | AC | 15 ms | 508 KB |
1
|