結果
| 問題 | No.111 あばばばば |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-05 21:15:06 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 5,000 ms |
| + 686µs | |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 42 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 06:44:44 |
| 合計ジャッジ時間 | 993 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}