結果
問題 |
No.8117 Simple Programming Language
|
ユーザー |
![]() |
提出日時 | 2025-04-01 23:19:24 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,638 bytes |
コンパイル時間 | 3,165 ms |
コンパイル使用メモリ | 278,528 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-04-01 23:19:33 |
合計ジャッジ時間 | 6,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { cout << "$1 = 1" << endl << "$2 = 1" << endl << "$3 = 1" << endl; int num = 4; cout << "$" << num << " = H * 11" << endl; cout << "$" << num << " = $" << num << " + W" << endl; for (int h = 1; h <= 10; h++) { for (int w = 1; w <= 10; w++) { int k = h * 11 + w; cout << "if($" << num << " == " << k << ")" << endl; int tot = 0; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { tot += i * w + j; } } cout << "\t$3 = " << tot << endl; cout << "end" << endl; } } for (int h = 1; h <= 10; h++) { for (int w = 1; w <= 10; w++) { for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { cout << "$" << num << " = H * 11" << endl; cout << "$" << num << " = $" << num << " + W" << endl; cout << "$" << num << " = $" << num << " * 101" << endl; cout << "$" << num << " = $" << num << " + a[" << i << "," << j << "]" << endl; num++; cout << "$" << num << " = " << h << " * 11" << endl; cout << "$" << num << " = $" << num << " + " << w << endl; cout << "$" << num << " = $" << num << " * 101" << endl; cout << "$" << num << " = $" << num << " + b[" << i << "," << j << "]" << endl; num++; cout << "if($" << num - 2 << " == $" << num - 1 << ")" << endl; cout << "\t$3 = $3 - " << j << endl; cout << "\t$" << num << " = W * " << i << endl; cout << "\t$3 = $3 - $" << num << endl; num++; cout << "end" << endl; } } } } cout << "$1 = $3 / W" << endl; cout << "$2 = $3 % W" << endl; cout << "return($1,$2)" << endl; return 0; }