結果
| 問題 |
No.111 あばばばば
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-05 21:15:06 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 189 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 20:41:47 |
| 合計ジャッジ時間 | 639 ms |
|
ジャッジサーバー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;
}