結果
| 問題 |
No.375 立方体のN等分 (1)
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2016-07-11 15:00:07 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-13 11:20:00 |
| 合計ジャッジ時間 | 1,194 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 29 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld", &n);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
long long int n;
scanf("%lld", &n);
if(n % 3 == 0){
printf("%lld", n / 3);
}
else if(n % 2 == 0){
printf("%lld", n / 2);
}
else{
printf("%lld", n - 1);
}
printf(" %lld\n", n - 1);
return 0;
}
suppy193