結果
| 問題 | No.111 あばばばば |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-05 21:15:06 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 5,000 ms |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 162 ms |
| コンパイル使用メモリ | 28,996 KB |
| 最終ジャッジ日時 | 2026-02-23 20:32:56 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld",&l);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long l;
scanf("%lld",&l);
l=(l-1)/2;
if (l<=0)
printf("1");
else
printf("%lld",l*(l+1)/2+l*(l-1)/2);
return 0;
}