結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2024-03-01 23:02:12 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 426 bytes |
| コンパイル時間 | 1,190 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-29 14:47:37 |
| 合計ジャッジ時間 | 2,079 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 WA * 2 |
ソースコード
#include <stdio.h>
int main () {
int n = 0;
int res = 0;
int is_ng = 0;
int v = 0;
int h = 0;
res = scanf("%d", &n);
v = n/2;
h = (n+1)/2;
if ((((v*(v+1))/2)%4 != 0 && ((v*(v+1))/2)%4 != 2) || v == 1 || v == 2) {
is_ng = 1;
}
if (h%2 == 1 || (h*h)%4 != 0 || h == 2) {
is_ng = 1;
}
if (is_ng > 0) {
printf("No\n");
} else {
printf("Yes\n");
}
return 0;
}
chro_96