結果
問題 | No.333 門松列を数え上げ |
ユーザー | Ysmr_Ry |
提出日時 | 2016-03-03 11:32:55 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 215 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 32,908 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-24 19:38:24 |
合計ジャッジ時間 | 763 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,348 KB |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | AC | 1 ms
4,348 KB |
testcase_03 | AC | 0 ms
4,348 KB |
testcase_04 | AC | 1 ms
4,348 KB |
testcase_05 | AC | 0 ms
4,348 KB |
testcase_06 | AC | 0 ms
4,348 KB |
testcase_07 | AC | 1 ms
4,348 KB |
testcase_08 | AC | 0 ms
4,348 KB |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf( "%d%d", &A, &B ); | ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
// yukicoder 333 (http://yukicoder.me/problems/935) #include<cstdio> #include<algorithm> int A, B; int main() { scanf( "%d%d", &A, &B ); printf( "%d\n", A>B?(2000000000-A)+(A-B-1):(A-1)+(B-A-1) ); return 0; }