結果
問題 | No.111 あばばばば |
ユーザー | TLwiegehtt |
提出日時 | 2015-07-07 07:38:51 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 754 ms / 5,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 133 ms |
コンパイル使用メモリ | 23,940 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-22 09:18:21 |
合計ジャッジ時間 | 1,896 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 0 ms
4,376 KB |
testcase_03 | AC | 754 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,384 KB |
testcase_06 | AC | 4 ms
4,380 KB |
testcase_07 | AC | 74 ms
4,380 KB |
testcase_08 | AC | 352 ms
4,376 KB |
testcase_09 | AC | 1 ms
4,380 KB |
ソースコード
#include <stdio.h> int main(void){ int i; int a,b,l; long long int cnt; long long int ans=0; // unsigned 64bitをxに確保。 scanf("%d", &l); a = (l/2)+1; b = (l/2); for(i=a,cnt=1;i>=2;i--,cnt++){ ans += cnt; } for(i=b,cnt=1;i>=2;i--,cnt++){ ans += cnt; } printf("%lld\n", ans); // 特殊な「 %I64u 」を使用する。 return 0; }